Skip to content
Back to skills

126 Fn 21 3f5c6520

ASecurity

Implement context hints gathering for codex reviews. This replaces RP's context builder with a lightweight grep-based approach.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
developmentpythongogitbackend

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 126-fn-21_3f5c6520 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 126 Fn 21 3f5c6520?

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

Security grade badge for 126 Fn 21 3f5c6520
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-126-fn-21-3f5c6520/badge)](https://www.skillsdirectory.com/skills/tools-only-126-fn-21-3f5c6520)

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

SKILL.md
# fn-2.1 Implement context hints for codex reviews

## Description

Implement context hints gathering for codex reviews. This replaces RP's context builder with a lightweight grep-based approach.

### Approach

Use repo-scout-style pattern (inline in flowctl, not subagent):
1. Get changed files from `git diff --name-only <base>`
2. Extract imports/references from changed files
3. Find files that reference changed exports (simple grep)
4. Format as hints: `- path/to/file.ts:42 - reason`

### Output format

```
Consider these related files:
- src/auth.ts:15 - imports validateToken (called by changed code)
- src/types.ts:42 - defines User interface (used in diff)
- src/middleware/session.ts:8 - session management pattern
```

### Implementation

Add to flowctl.py:
```python
def gather_context_hints(base_branch: str) -> str:
    # 1. git diff --name-only base_branch
    # 2. For each changed file, extract imports
    # 3. grep for references to changed symbols
    # 4. Format and return hints
```

This will be called from `codex impl-review` and `codex plan-review` (fn-2.2).

### Files to modify

- `plugins/flow-next/scripts/flowctl.py` - add context hints function
## Acceptance
- [ ] Context hints gathered from git diff
- [ ] Imports/exports extracted from changed files
- [ ] Related files found via grep
- [ ] Output format: `- path:line - reason`
- [ ] Works with empty diff (returns empty hints, no error)
- [ ] Works with large diff (reasonable limit, not 1000 files)
## Done summary
- Added gather_context_hints(base_branch) to flowctl.py
- Extracts symbols from Python/JS/TS/Go files via regex
- Finds external references via git grep
- Handles edge cases: empty diff, bad branch, large diffs (capped 50 files)

Why:
- Foundation for codex backend to get RP-like context hints
- Uses inline grep approach (no subagent needed)

Verification:
- smoke_test.sh passes
- Edge case tests pass (empty diff, bad branch)
## Evidence
- Commits: d757f023329535bb7b82047fe98469fb76224912
- Tests: smoke_test.sh
- PRs:

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.

Comments

Loading comments…

Newsletter

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