fit-framework: Command for Claude Code

.codex/commands/fit-analyze-codescan.md

fit-analyze-codescan is a command for Claude Code, Codex from ModelEngine-Group/fit-framework. It costs 13 tokens per session (627 once invoked), scanned A, original, MIT.

A command that examines a GitHub Code Scanning alert, including alerts from CodeQL, and writes a security analysis for it.

In plain words
What is it for?
Use it to inspect alert details, review the relevant source code, assess security risk, record repair suggestions, and create a follow-up task.
Why use it?
It turns a warning into a documented assessment of where the problem is, whether it can be reached, and how serious it may be.

Command for Claude CodeCodex

Written for Claude Code and Codex: argument-hint in frontmatter, but also installed under .codex/. Also seen: positional $N argument; mentions Claude Code; mentions Codex.

This is ModelEngine-Group/fit-framework's own configuration. It tells Claude Code and Codex how to work on fit-framework itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything fit-framework configures →

About the project

FIT is an enterprise AI development framework with a multilingual function engine, a flow orchestration engine, and Java tools for connecting language models, knowledge bases, and external tools. It is for Java-oriented teams building AI applications that can run locally or in distributed deployments with plugins. The catalogue add-ons provide commands, skills, instructions, and settings for working with FIT.

ModelEngine-Group/fit-framework · 2,117 stars · on GitHub · modelengine-ai.net

Reuse

Borrowing it

Nothing to install: this file belongs to ModelEngine-Group/fit-framework. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ModelEngine-Group/fit-framework/main/.codex/commands/fit-analyze-codescan.md
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/fit-framework

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fit-analyze-codescan

README.md
[![agentmods](https://agentmods.dev/badge/commands/modelengine-group/fit-framework/fit-analyze-codescan/github.svg)](https://agentmods.dev/commands/modelengine-group/fit-framework/fit-analyze-codescan)
Your own site
<a href="https://agentmods.dev/commands/modelengine-group/fit-framework/fit-analyze-codescan"><img src="https://agentmods.dev/badge/commands/modelengine-group/fit-framework/fit-analyze-codescan/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fit-analyze-codescan

Your own site · 80×15
<a href="https://agentmods.dev/commands/modelengine-group/fit-framework/fit-analyze-codescan"><img src="https://agentmods.dev/badge/commands/modelengine-group/fit-framework/fit-analyze-codescan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 627 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00013 $0.00627
Opus 5.5 $0.00005 $0.00251
Sonnet 5.5 $0.00003 $0.00125
Haiku 4.5 $0.00001 $0.00063

Measured 2mo ago against content hash f90f6ea05298, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fit-analyze-codescan 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 2mo 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-codescan.md · 65 lines

What it actually says

分析 Code Scanning (CodeQL) 告警 #$1,评估安全风险并创建修复任务。

执行以下步骤:

  1. 获取告警信息:

    gh api repos/{owner}/{repo}/code-scanning/alerts/$1
    

    提取: rule (id/severity/description), tool (name/version), most_recent_instance (location/message)

  2. 创建任务目录和文件:

    date +%Y%m%d-%H%M%S
    mkdir -p .ai-workspace/active/TASK-<timestamp>/
    

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

    • codescan_alert_number: $1
    • severity, rule_id, tool
    • current_step: security-analysis
    • assigned_to: codex
  3. 定位和分析源码:

    • 根据 most_recent_instance.location 定位源码文件和行号
    • 读取告警所在的源码上下文
    • 理解 CodeQL 规则的含义
    • 检查是否有其他位置也存在相同问题
  4. 评估安全风险:

    • 代码路径是否可达(外部输入能否到达漏洞点)
    • 漏洞的实际影响(是否可被利用)
    • 修复的紧急程度和复杂度
  5. 输出分析文档到 analysis.md,包含:

    • 告警基本信息(编号、严重程度、规则 ID、工具)
    • 源码位置和代码上下文
    • 影响范围评估(受影响代码和相同模式)
    • 安全风险评估(可利用性、攻击向量、影响程度)
    • 修复建议
    • 参考链接
  6. 更新任务状态:

    • current_step: security-analysis
    • updated_at: 当前时间
    • 标记 analysis.md 为已完成
  7. 告知用户:

    • 输出告警严重程度、任务ID、风险等级
    • 提示下一步设计修复方案:
      • Claude Code / OpenCode: /plan-task
      • Gemini CLI: /fit:plan-task
      • Codex CLI: /prompts:fit-plan-task
    • 如果是误报,关闭告警:
      • Claude Code / OpenCode: /close-codescan $1
      • Gemini CLI: /fit:close-codescan $1
      • Codex CLI: /prompts:fit-close-codescan $1

注意事项:

  • Critical/High 级别立即处理,Medium 计划处理,Low 可延后
  • 专注于信息收集和风险评估,不在此阶段制定修复方案
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. 2mo ago First seen · 65 lines · 13 tokens per session scan A f90f6ea05298

Subscribe to this mod's changes

fit-analyze-codescan is a command published in the GitHub repository ModelEngine-Group/fit-framework (2,117 stars, last pushed 7mo ago), licensed MIT. It adds 13 tokens to every session and 627 once invoked, about $0.0001 per session on Opus 5.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.