AGENT SKILL

security-review

Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.

使用场景后端与接口
License 许可
Apache-2.0
最近更新
2026-11-08
Stars
★ 0
Forks
0

01 前言 Front Matter

name
context-ranker
tags
workspace, context, token
version
1.0.0
description
Ranks candidate files and decides what to read first using workspace-map and lightweight heuristics.
allowed-tools
Read, Glob, Grep

02 资源文件 1

03 SKILL.md 正文

Context Ranker

Use this skill to reduce token waste by reading fewer files, earlier.

Core Principle

Start from the smallest evidence that can confirm/deny a hypothesis.

Workflow

  1. Start with the workspace map

    • Read .ai-context/workspace-map.json (first ~200 lines).
    • Use summary.line_guide to jump directly to file metadata.
  2. Generate candidates

    • Prefer files explicitly named by the user.
    • Otherwise, shortlist by keyword matching in filenames and directories.
  3. Rank (Top-K)

Score files by:

  • name match (strong)
  • directory relevance (medium)
  • description/type match (medium)
  • size penalty (prefer smaller)

Default K:

  • simple task: 1–3 files
  • moderate: 3–5 files
  • complex: 5–8 files (only with strong justification)
  1. Read surgically
    • Start with the smallest relevant range.
    • Expand only when needed.

Output Format

## Context Ranking

Top files to read next:
1. path/to/file.ext — why
2. path/to/file.ext — why
3. path/to/file.ext — why

Anti-Patterns

  • Reading many files before forming a hypothesis.
  • Searching broadly before consulting the workspace map.
  • Re-reading the same large file multiple times.

04 同仓库更多 Skills