Skip to content
Back to skills

Fi Annotate Pr

ASecurity

After opening a PR that addresses an [open] entry, attach the canonical (PR: org/repo#N) reference so sync auto-flips the entry when the PR merges — bare text like 'PR #N' in an entry is invisible to sync; this command writes the only format that closes the loop. When several entries cite one touched file a candidate list appears: re-run with --pick path:line for exactly the entries the PR addresses, never --all as a shortcut. Use $fi-annotate-commit instead when the fix is a direct commit wi...

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 9, 2026
ai-agentsbashgit

Works with

  • cli

Security analysis

A100/100

Scanned October 9, 2026

npx -y skills add AltDoug/found-issues --skill fi-annotate-pr --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fi Annotate Pr?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fi Annotate Pr
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/altdoug-fi-annotate-pr/badge)](https://www.skillsdirectory.com/skills/altdoug-fi-annotate-pr)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fi-annotate-pr
description: "After opening a PR that addresses an [open] entry, attach the canonical (PR: org/repo#N) reference so sync auto-flips the entry when the PR merges — bare text like 'PR #N' in an entry is invisible to sync; this command writes the only format that closes the loop. When several entries cite one touched file a candidate list appears: re-run with --pick path:line for exactly the entries the PR addresses, never --all as a shortcut. Use $fi-annotate-commit instead when the fix is a direct commit with no PR."
---
<!-- loc-override: generated 1:1 from commands/annotate-pr.md by scripts/gen-codex-skills.sh; length is owned by the source command file -->

After running `gh pr create` (or noticing a PR was opened), annotate any
`[open]` entries the PR addresses with `(PR: org/repo#N)`. The sync hook
will then auto-flip those entries to `[fixed]` when the PR merges.

## What to do

```bash
found-issues annotate-pr <the user-provided arguments>
```

The CLI:
1. Verifies the PR exists via `gh pr view`
2. Fetches the list of files touched by the PR
3. Scans `docs/found-issues.md` for `[open]` entries whose paths match those files
4. Without `--pick`/`--all`, writes only a NON-closing suggestion
   `(PR-auto: org/repo#N)` on UNAMBIGUOUS matches — entries that are the sole
   `[open]` entry citing their touched file. A touched file is not a fixed
   entry, so a bare run never writes the closing token. When several entries
   share one touched file, the CLI suggests none of them and prints the
   candidate list instead.
5. `--pick <path:line>,...` writes the closing `(PR: org/repo#N)` on exactly
   the entries you name (and confirms a pending suggestion in place).

Possible outputs:

- `Annotated N entries with (PR: org/repo#N)` — a `--pick`/`--all` run; these
  close when the PR merges
- `Suggested N entries with (PR-auto: org/repo#N) — pending review, will NOT
  close on sync` — a bare run. Compare each entry's symptom against the PR,
  then confirm the ones it actually fixes with the printed `--pick` command
- `annotate-pr: no [open] entries match files touched by PR #N. No changes.` — edge case (PR addresses code with no logged entries)
- A candidate list ending in a `--pick` instruction — ambiguous matches that
  need YOUR judgment. **Do not skip this step.** Compare each candidate's
  symptom against what the PR actually changes, then re-run with only the
  entries the PR genuinely addresses:

  ```bash
  found-issues annotate-pr <N> --pick path/file.py:42,path/other.py:7
  ```

  Locations are exactly as printed in the candidate list (`path:line`, or a
  bare path for line-less entries). If the PR really does address every
  listed candidate (e.g. a release PR sweeping all open issues), use
  `found-issues annotate-pr <N> --all` instead. Never use `--all` to save
  yourself the symptom comparison.

  When TWO entries share the same `path:line`, a bare location pick is
  refused (it cannot select between them) — use the extended form with a
  symptom fragment:

  ```bash
  found-issues annotate-pr <N> --pick "src/hot.py:2 — null deref"
  ```

Pass the result through to the user.

## When to invoke

The post-bash dispatcher hook normally suggests these annotations automatically
(`--hook-auto`: line-matched entries get a NON-closing `-auto` suggestion
and the hook prints the `--pick` command to confirm them; exit 3 surfaces
candidates). This command is the manual fallback for web-UI PRs or when
hooks are disabled.

If the hook did surface a candidate list (exit 3) right after `gh pr create`,
that output includes the suggested `--pick` command line — **run it
immediately**, don't defer. If the hook didn't fire at all (e.g., user
opened the PR via the GitHub web UI or via a non-Bash tool, or
`FOUND_ISSUES_AUTO_ANNOTATE=off`), invoke this command manually with the
PR number.

## Multi-PR entries

A single entry can be addressed by multiple PRs (e.g., partial fix → revert
→ re-fix). Running `$fi-annotate-pr` multiple times with different PR
numbers is safe — both annotations get appended:

```
- [open] 2026-05-06 src/foo.py:42 — leak (PR: org/repo#5) (PR: org/repo#7)
```

Sync checks each PR independently; the entry flips to `[fixed]` when any
one merges to the default branch.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.