Codex skill kit

From J4X-Security/K.I.T · View interactive version

Codex skill kit is an AI agent skill from the GitHub repository J4X-Security/K.I.T. Use KIT / Known Issue Triager when asked to consolidate audit findings into a canonical known-issues.json register, extend an existing known-issues file with new audit sources, or check whether a newly reported issue is already known. Supports local files, local audit folders, repo directories, dire

How to use this skill

Skill file

KIT / Known Issue Triager

Use this skill when the task is to turn a collection of audit reports into a canonical known-issues register or to compare a new issue against that register.

Start Rule

Do not start running commands immediately.

Always begin by asking the user what they want to do, even if the user invoked the skill directly. The first response should be a small conversational chooser, not execution.

Do not repeat that the skill is being used. The host already shows that.

Do not render the opening menu twice.

The first response must contain exactly one question block, then stop and wait for the user's reply.

Use this exact opening format:

K K  III  TTTTT
K K   I     T
KK    I     T
K K   I     T
K K  III    T

Known Issue Triager

What do you want to do?
- build: create or extend a known-issues.json register from audit sources
- check: compare one new issue against an existing register
- help: show the workflow and examples

Reply with: build, check, or help.

If they choose build and known-issues.json already exists in the current working directory, ask a second question before doing any work:

Reply with: extend or rebuild.

If known-issues.json does not exist yet, do not ask this question. Default to rebuild behavior.

If they choose build, collect sources iteratively instead of assuming them all at once.

Do not ask the user to classify a source as local or URL first. Infer that from the string they provide.

After each source is added, ask for the next source in one short line, for example:

Send the next source path or URL, or reply done.

Infer source type from the value:

Do not run the engine until the user has explicitly chosen a mode and, for build mode, explicitly finished source collection.

Engine

This Codex skill uses the shared engine wrapper at:

python3 ~/.codex/skills/kit/scripts/known_issues.py

The wrapper delegates to the shared engine from this repository and exposes the same commands:

Build Workflow

Guide the user through:

  1. If known-issues.json already exists in the current working directory, ask whether to extend it or rebuild from scratch. Otherwise default to rebuild without asking.
  2. Collect sources iteratively.
  3. Sources may be:
  1. Infer each provided source from its string value rather than asking the user to label it.
  2. Prefer the staged flow:
python3 ~/.codex/skills/kit/scripts/known_issues.py prepare-build \
  --input path/to/report-or-folder \
  --input https://github.com/org/audit-repo/tree/main/reports \
  --merge-known known-issues.json \
  --state-file known-issues.json
  1. Read known-issues.json.
  2. If existing_issues_snapshot is present, treat those as the current canonical register for extend mode.
  3. For each prepared source, read the normalized text file path listed there.
  4. Fill source_results inside that same known-issues.json.
  5. Deduplicate both the new extracted issues and the existing canonical issues from existing_issues_snapshot when present, then write the final canonical register into canonical_issues inside that same known-issues.json.
  6. Finalize:
python3 ~/.codex/skills/kit/scripts/known_issues.py finalize-build \
  --state-file known-issues.json \
  --output known-issues.json

To extend an existing register:

python3 ~/.codex/skills/kit/scripts/known_issues.py finalize-build \
  --state-file known-issues.json \
  --merge-known known-issues.json \
  --output known-issues.json

Check Workflow

Before running check mode, confirm whether the user is providing:

Reply with: text or file.

Prefer the staged check flow:

python3 ~/.codex/skills/kit/scripts/known_issues.py prepare-check \
  --known known-issues.json \
  --issue-file path/to/new-issue.md

Or:

python3 ~/.codex/skills/kit/scripts/known_issues.py prepare-check \
  --known known-issues.json \
  --issue-text "Unchecked transfer result can desynchronize reward accounting."

Then:

  1. Read the staged JSON output.
  2. Read llm_contract and follow it exactly.
  3. Read report_text and identify the findings from that raw report text using the finding_extraction contract.
  4. If there is more than one finding, spawn one subagent per finding so the duplicate checks run in parallel.
  5. Give each subagent:
  1. If there is exactly one finding, do the judgment in the main thread using the same contract.
  2. After all subagents finish, merge their outputs into one ordered result list sorted by finding_index.
  3. Return one verdict per finding using the required output schema from llm_contract.

Operating Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.