fit-analyze-issue

A command that reads a GitHub Issue, meaning a tracked task or problem, and writes a requirements-analysis document for it.

In plain words
What is it for?
Use it to create a timestamped task folder, record the issue and workflow state, inspect related files, assess risks and dependencies, and produce an analysis report.
Why use it?
It gathers the issue details and affected code before implementation, helping prevent premature or misdirected coding.

Command for Codex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/modelengine-group/fit-framework/fit-analyze-issue
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/fit-framework

Made for: Codex.

Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.00578
Opus 5 $0.00005 $0.00289
Sonnet 5 $0.00002 $0.00116
Haiku 4.5 $0.00001 $0.00058

Measured 3d ago against content hash ac72df66de5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fit-analyze-issue scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/commands/fit-analyze-issue.md · 67 lines

What it actually says

分析 GitHub Issue #$1 并创建任务文件。

执行以下步骤:

  1. 获取 Issue 信息:

    gh issue view $1 --json number,title,body,labels
    

    如果 Issue 不存在,提示用户检查 Issue 编号。

  2. 生成任务ID:

    date +%Y%m%d-%H%M%S
    
  3. 创建任务目录:

    mkdir -p .ai-workspace/active/TASK-<timestamp>/
    

    使用 Write 工具基于 .agents/templates/task.md 模板创建 task.md 文件:

    • 填写任务元数据: issue_number=$1, title, created_at, workflow 等
    • created_by: human
    • current_step: requirement-analysis
    • assigned_to: codex
  4. 执行需求分析(仅分析,不编写任何业务代码):

    • 阅读并理解 Issue 描述
    • 搜索相关代码文件(使用 glob/grep,只读不改)
    • 分析代码结构和影响范围
    • 识别潜在的技术风险和依赖
    • 评估工作量和复杂度
  5. 输出分析文档到 analysis.md,包含:

    • 需求理解(重新描述需求)
    • 相关文件列表(带文件路径和行号)
    • 影响范围评估(直接影响和间接影响)
    • 技术风险
    • 依赖关系
    • 工作量和复杂度评估
  6. 更新任务状态:

    • current_step: requirement-analysis
    • updated_at: 当前时间
    • 标记 analysis.md 为已完成
    • 在"工作流进度"中标记 requirement-analysis 为完成 ✅
  7. 告知用户:

    • 输出任务ID、标题、工作流
    • 显示输出文件路径
    • 提示下一步设计技术方案:
      • Claude Code / OpenCode: /plan-task
      • Gemini CLI: /fit:plan-task
      • Codex CLI: /prompts:fit-plan-task

注意事项:

  • 严格遵循 .agents/workflows/feature-development.yaml 工作流定义
  • 🔴 禁止编写、修改任何业务代码,只做分析
  • 分析完成后建议人工审查
  • 如果已存在相关任务,询问是否重新分析

🛑 STOP: 完成上述步骤后立即停止。不要继续执行 plan、implement 或任何后续步骤。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 67 lines · 11 tokens per session scan A ac72df66de5b

Subscribe to this mod's changes

fit-analyze-issue is a command published in the GitHub repository ModelEngine-Group/fit-framework (2,117 stars, last pushed 5mo ago), licensed MIT. It adds 11 tokens to every session and 578 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.