QualifiedCProgramming: Skill for Claude Code

.agents/skills-en/annotation-designing/SKILL.md

annotation-designing is a skill for Claude Code, Codex from QinxiangCao/QualifiedCProgramming. It costs 56 tokens per session (901 once invoked), scanned A, original, MIT.

A formal annotation-writing process for C programs that turns a problem into mathematical specifications, function contracts, and loop invariants. It also repairs failed symbolic-execution attempts, where a tool checks program behavior using symbolic inputs rather than only examples.

In plain words
What is it for?
Use it to write or revise Rocq specifications, C preconditions and postconditions, loop invariants, and proofs for annotation or symbolic-execution workflows.
Why use it?
It keeps the problem statement, proof specification, and C contract aligned. It reduces repeated or inconsistent definitions when proving that code meets its intended behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is QinxiangCao/QualifiedCProgramming's own configuration. It tells Claude Code and Codex how to work on QualifiedCProgramming 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 QualifiedCProgramming configures →

Reuse

Borrowing it

Nothing to install: this file belongs to QinxiangCao/QualifiedCProgramming. 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/QinxiangCao/QualifiedCProgramming/main/.agents/skills-en/annotation-designing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/QinxiangCao/QualifiedCProgramming

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 annotation-designing

README.md
[![agentmods](https://agentmods.dev/badge/skills/qinxiangcao/qualifiedcprogramming/annotation-designing/github.svg)](https://agentmods.dev/skills/qinxiangcao/qualifiedcprogramming/annotation-designing)
Your own site
<a href="https://agentmods.dev/skills/qinxiangcao/qualifiedcprogramming/annotation-designing"><img src="https://agentmods.dev/badge/skills/qinxiangcao/qualifiedcprogramming/annotation-designing/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 annotation-designing

Your own site · 80×15
<a href="https://agentmods.dev/skills/qinxiangcao/qualifiedcprogramming/annotation-designing"><img src="https://agentmods.dev/badge/skills/qinxiangcao/qualifiedcprogramming/annotation-designing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 901 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.00056 $0.00901
Opus 5.5 $0.00022 $0.00360
Sonnet 5.5 $0.00011 $0.00180
Haiku 4.5 $0.00006 $0.00090

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

Security

Grade A, and why

annotation-designing 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 today.

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-en/annotation-designing/SKILL.md · 41 lines

How it starts

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

Annotation Design and Authoring

One annotation owner handles the initial attempt and every retry in the main root.

Work in this order:

problem statement
  -> natural-language specification
  -> Rocq specification
  -> C function contract
  -> loop invariant
  -> symexec

The natural-language specification, Rocq Spec, and C Ensure state the same output relation. Editorials, algorithm hints, loop state, DP transitions, and data-structure construction do not belong in the top-level specification.

Before writing a definition, search the current dependencies, canonical case library, and shared libraries. Directly combine existing predicates such as Zlength, Znth, sublist, replace_Znth, Forall, Forall2, In, NoDup, Permutation, sum, and the existing monotonicity, extrema, path, and array predicates. Do not add successive wrappers around those combinations. When the problem meaning or a cross-function interface needs a name, keep one case predicate and refer to it directly everywhere else.

Result and progress predicates contain mathematics only, without memory ownership, input restrictions, or implementation-safety ranges. Retain the candidate sets, valid domains, and output formats needed to define the answer. Expand input ranges, element ranges, and overflow conditions in the function contract. Use With for logical values and Require for entry conditions and resources. The mathematical part of Ensure promises only the required final result; return spatial resources separately.

Use Z and Z-indexed list interfaces in new specifications, helpers, and annotations, and Forall for index-independent elementwise properties. Extrema must use MaxMinLib's min_value_of_subset / max_value_of_subset. Reuse sum_range / sum / sum_set_R for sums, Zrange for range enumeration, clos_refl_trans for reflexive-transitive closure, Veci / Vecp / VecpArray for growable vectors, and CDCLLib's literal / clause / cnf / models / cnf_sat / cnf_unsat for CNF and SAT; do not redefine these meanings. See the knowledge rules for boundaries, signatures, and examples.

Put one Inv Assert before every loop. It contains only mathematical progress, ranges needed by the next execution step, live resources, and necessary @pre bridges. Use an ordinary Assert only when symbolic execution cannot recover state needed downstream; it may appear before an if, but not before a return or an Inv Assert. Do not use by local, branch control, ordinary Inv, multi-invariants, or call where clauses in a function body.

Keep a user-provided specification unchanged. If it must change, describe the function, reason, edit, and semantic change in agent_output.md and return it to main. Continue in the same attempt after user approval and unfreeze.

Read the full file on GitHub · 41 lines

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. today Changed b3659b1cc606
  2. 1mo ago Changed · +2 lines 178e0798b25d
  3. 1mo ago First seen · 39 lines · 56 tokens per session scan A 56fac5cadf8e

Subscribe to this mod's changes

annotation-designing is a skill published in the GitHub repository QinxiangCao/QualifiedCProgramming (51 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 901 once invoked, about $0.0002 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-09-15.

Related

Other skills, from other repositories