prompt-hardener: Skill for Claude Code

.agents/skills/agent-spec-builder/SKILL.md

agent-spec-builder is a skill for Claude Code from cybozu/prompt-hardener. It costs 75 tokens per session (3,154 once invoked), scanned A, original, Apache-2.0.

A tool for creating an agentspec.yaml file that describes how an AI agent should be analyzed. It can build the file from an existing codebase or from answers in an interview.

In plain words
What is it for?
Use it to generate an agent specification, an evidence log, and a list of unanswered questions for prompt analysis and later fixes.
Why use it?
It turns scattered project information into a checked, structured specification and records where each detail came from. Unresolved decisions are listed separately instead of being hidden.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is cybozu/prompt-hardener's own configuration. It tells Claude Code how to work on prompt-hardener 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 prompt-hardener configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cybozu/prompt-hardener. 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/cybozu/prompt-hardener/main/.agents/skills/agent-spec-builder/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/cybozu/prompt-hardener

Made for: Claude Code.

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 agent-spec-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/cybozu/prompt-hardener/agent-spec-builder/github.svg)](https://agentmods.dev/skills/cybozu/prompt-hardener/agent-spec-builder)
Your own site
<a href="https://agentmods.dev/skills/cybozu/prompt-hardener/agent-spec-builder"><img src="https://agentmods.dev/badge/skills/cybozu/prompt-hardener/agent-spec-builder/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 agent-spec-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/cybozu/prompt-hardener/agent-spec-builder"><img src="https://agentmods.dev/badge/skills/cybozu/prompt-hardener/agent-spec-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,154 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 312
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.00075 $0.03154
Opus 5 $0.00037 $0.01577
Sonnet 5 $0.00015 $0.00631
Haiku 4.5 $0.00007 $0.00315

Measured 9d ago against content hash 067c14456f68, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

agent-spec-builder 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 9d 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.

.agents/skills/agent-spec-builder/SKILL.md · 373 lines

How it starts

The opening of the file, as written. The whole thing — 373 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Spec Builder

You create Prompt Hardener agent_spec.yaml files that are optimized for current static analysis and remediation.

Output

You always produce exactly 3 files:

  1. agent_spec.yaml — Valid spec that passes prompt-hardener validate
  2. evidence.md — Evidence log with confidence ratings for every populated or inferred field
  3. open_questions.md — Unresolved fields grouped by analysis priority

Source Of Truth

This skill is meant to be portable. Treat the bundled files in references/ as the primary source of truth:

  • field-catalog.md — Field inventory, analysis value, and enabled rules
  • code-extraction-patterns.md — Search patterns for from-code mode
  • output-templates.md — Output templates and YAML comment conventions
  • question-flow.md — Interview flow for from-questions mode

If repository docs such as docs/agent-spec.md or docs/analysis-rules.md are available, use them only as an optional cross-check. Do not assume they exist.

General Rules

  • Only write schema-supported fields into agent_spec.yaml.
  • Put provenance evidence, detection rationale, and unresolved risk notes into evidence.md or open_questions.md, not into ad hoc YAML fields.
  • Keep confidence explicit for every inferred value.
  • Use current rule IDs only. Never mention deprecated or nonexistent rule IDs.

Mode Selection

Determine the mode and scope from the user's input:

  1. If the user explicitly says from-code or from-questions, use that mode.
  2. If the user passes a path, scope the scan or interview to that path.
  3. Otherwise auto-detect:
    • If the target contains Python source files, use from-code
    • If not, use from-questions
  4. Tell the user which mode you selected and why.

FROM-CODE Mode

Phase 0: Agent Discovery

Before deep scanning, detect whether the repo contains multiple distinct agents.

Run these checks in parallel:

  1. System prompt signals: search for system_prompt, SYSTEM_PROMPT, role.*system, SystemMessage, system_instruction
  2. Entrypoints: search for main.py, app.py, server.py, agent.py, __main__.py
  3. Service boundaries: look for subdirectories with their own pyproject.toml, requirements.txt, Dockerfile, prompts/, or config/

Read the full file on GitHub · 373 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 373 lines · 75 tokens per session scan A 067c14456f68

Subscribe to this mod's changes

agent-spec-builder is a skill published in the GitHub repository cybozu/prompt-hardener (54 stars, last pushed 8d ago), licensed Apache-2.0. It adds 75 tokens to every session and 3,154 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

ai-engineer-expert

Expert-level AI implementation, deployment, LLM integration, and production AI systems. Use when the user mentions AI engineering, LLM, deployment, production AI, or integration, or when the task involves LLM Patterns, LLM Integration, or Production Systems.

personamanagmentlayer/pcl · 58 tokens

ai-architect-expert

Expert-level AI system design, MLOps, architecture patterns, and AI infrastructure. Use when the user mentions AI architecture, MLOps, system design, AI infrastructure, or scalability, or when the task involves AI System Architecture, MLOps Infrastructure, Scalability Patterns, or Architecture Design.

personamanagmentlayer/pcl · 66 tokens

ml-expert

Expert-level machine learning, deep learning, model training, and MLOps. Use when the user mentions machine learning, deep learning, neural networks, MLOps, or data science, or when the task involves Machine Learning Fundamentals, Data Preparation, or Model Training.

personamanagmentlayer/pcl · 58 tokens

embed

Generate, inspect, and use node/text embeddings in VeritasReason — compute Node2Vec embeddings, find similar nodes, score link predictions, batch similarity, and pairwise similarity. Uses NodeEmbedder, SimilarityCalculator, LinkPredictor, and AgentContext. Sub-commands: compute, similar, similarity, predict-link…

bibinprathap/VeritasGraph · 0 tokens

visualize

Visualize the VeritasReason knowledge graph — topology, centrality, communities, paths, embeddings, decision insights, and temporal evolution. Uses GraphAnalyzer, CentralityCalculator, CommunityDetector, PathFinder, and ContextGraph analytics. Sub-commands: topology, centrality, community, path, decision-graph…

bibinprathap/VeritasGraph · 0 tokens

reason

Run reasoning over the VeritasReason knowledge graph — deductive logic, abductive hypothesis generation, Datalog programs, SPARQL queries, Rete network evaluation. Uses DeductiveReasoner, AbductiveReasoner, DatalogReasoner, SPARQLReasoner, ReteEngine. Sub-commands: deductive, abductive, datalog, sparql, rete, prove…

bibinprathap/VeritasGraph · 0 tokens