tradecraft-library

tradecraft-library is a skill for Claude Code, Codex from samugit83/redamon. It costs 176 tokens per session (3,655 once invoked), scanned A, original, MIT.

A set of rules for building a private library of knowledge sites for each account. It covers storing, searching, refreshing, converting, deleting, and reading pages while keeping users, resources, and access scopes separate.

In plain words
What is it for?
Use it when changing library storage, search, chat retrieval, catalogues, coverage views, settings, tables, or related web routes.
Why use it?
It prevents one account or resource from reading another's data and keeps untrusted page text from being treated as instructions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node webapp/scripts/gen-tradecraft-spec.mjs --check # the agent's spec and vocabulary copies.

Good fit Use it when changing library storage, search, chat retrieval, catalogues, coverage views, settings, tables, or related web routes.

Compare 6 skills from other repositories ↓
About the project

RedAmon is an AI framework that connects reconnaissance, exploitation, and post-exploitation activities into an automated security-testing pipeline, while organizing findings and proposing code fixes. It is for authorized penetration testing, security research, and education. The catalogue entries provide skills and instructions for working with the framework.

samugit83/redamon · 3,544 stars · on GitHub · redamon.org

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/samugit83/redamon
agentmods
npx agentmods add skills/samugit83/redamon/tradecraft-library

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 tradecraft-library

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/samugit83/redamon/tradecraft-library"><img src="https://agentmods.dev/badge/skills/samugit83/redamon/tradecraft-library.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 176 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,655 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.00176 $0.03655
Opus 5.5 $0.00070 $0.01462
Sonnet 5.5 $0.00035 $0.00731
Haiku 4.5 $0.00018 $0.00365

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

Security

Grade A, and why

tradecraft-library 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 10d 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.

skills/tradecraft-library/SKILL.md · 182 lines

How it starts

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

When to Use

  • Changing how a resource is ingested, stored, refreshed, curated, converted or deleted.
  • Changing what a chat run reads from the library: the catalog, search, a section read, the librarian, Library now, the coverage map.
  • Adding a Tradecraft setting, a table or a column, or a route under the tradecraft paths.

How the feature works is in docs/readmes/README.TRADECRAFT.md; this skill holds only the rules a change must keep. Authorization of the routes themselves is the rbac-authz skill; a new agent tool is agentic-tool-integration.


Critical Rules

  • NEVER write a page-store statement that is not keyed by the owner and the resource. The SQL lives in four places only: STATEMENTS in agentic/tradecraft/store.py, library/search_sql.py, the conversion's own STATEMENTS in convert.py and COVERAGE_SQL in library/coverage.py. Each statement takes user_id and the resource id (or the run catalog's resource ids), and reads entries, sections and the tree joined to the resource row's live generation: no caller names a generation except the job writing its own. A read by CVE id of a CVE archive's index (archive_entries in search_sql.py) is keyed the same way and leaves out an entry the person blocked. A statement that cannot be keyed by one owner goes in its module's UNKEYED_STATEMENTS with its reason (today store.py's install total and expired-lease scan, convert.py's sweep_users); a new place for SQL is a new place every reviewer must know. On the webapp, a resource is read only by its id and the path's account (loadOwnResource in resourceAccess.ts). Failed before: 522b9f7e (an administrator read another account's page text and map), 85616179 (one search read two generations across its statements).
  • NEVER write from a read path. agentic/tradecraft/library/reader.py, read_now.py, check_url.py and preview.py store nothing: Check URL imports neither the store nor a model builder, the preview neither the store nor a database driver. There is no page cache, and the code-search test fails on its names (tests/tradecraft_no_cache_names_test.sh). Failed before: 1.x cached pages by URL in one volume for every account (removed in d0506809).
  • NEVER let page text, a title or a target's output reach a prompt or a tool result outside the untrusted envelope (wrap_untrusted in library/types.py), and never let a model's answer through unchecked: the librarian's page IDs, excerpts and why lines are checked in librarian/validate.py. Library now's trusted lines and notices are fixed text: the steps it searches for (model- or person-written) and its rows sit inside the envelope, with no page text (library/hints.py); a reading tool's refusal, outside the envelope, names a page by its ID or a resource by its slug, never a title, a heading or a URL (the URL follows in an envelope of its own, reader.with_url: a site's link with spaces carries a sentence), and a CVE archive's refusal of a page ID names the ID (library/reader.py). Failed before: aab51561 (the librarian's plan prompt and why lines carried unchecked text), 1b0657be (a target-planted CVE id in a hint's trusted lines), 18b7fdcb (Library now's step, with its hidden characters, in the block's trusted header), 0c030034 (a read's refusal quoted a map title and a page's headings outside the envelope).
  • NEVER send a site login anywhere but its own host, through the browser, or in another person's run. Bind it with fetch.use_login and send it only as same_host_headers in ingest/fetch.py; while one is bound, the browser is refused. A login resource enters a run's catalog only when isOwnerRun holds (catalog.ts), and its pages are read only within its live map. A login is used and changed only through the act-as refusals of actAs.ts, and no answer carries a secret value (masking.ts). A URL moved to another host keeps its login only when the person types it again (tradecraftLoginSecretReentry in secretEndpointRebind.ts, from the patch's "set" parts). Failed before: ce84a975 (a login read accepted dropped entries as the map), 497c00da (a catalog asked with no person, and a login in the 1.x run payload), a login that followed an edited URL to any host.
  • NEVER read or parse a site's answer without a byte ceiling and a bound on what it expands to. Ingestion and reads run in the agent process every account shares: every fetch_raw of a page, index or listing passes its max_bytes (a page's fetch.PAGE_MAX_BYTES, an index's constants.sitemapMaxBytes), a truncated index is not parsed, and a parsed structure is walked within the map limit, not its declared size. Failed before: a ~300-byte mkdocs.yml of YAML aliases named a million nav entries (a billion in ~400 bytes) before _dedupe capped them, and a CVE archive's file was read up to the 100 MB transport ceiling. Held by test_tradecraft_ingest_builders.py and test_tradecraft_cve_patterns.py.
  • NEVER let a run's read leave its resource, or send a GitHub token outside its repository or its owner's run. A forced section_path reads only a page of the resource (_in_resource in library/reader.py: its start page, its live map, its 1.x map); a run's token is _Read.token_for(url), which is fetch.repo_token (the same owner and repository, no dot segment) and is None outside V2Catalog.owner_run; the catalog carries a resource's override only in its owner's run (catalog.ts). A new read path takes its token from token_for, never the raw value. Failed before: 1.x through 7.8.0 read any URL a section_path named, with the project owner's token, in every run on the project. Held by test_tradecraft_read_scope.py.
  • NEVER list a CVE archive's index without a GitHub token, or send the token anywhere but GitHub. index_cve in ingest/builders.py makes no call without the job's token (cve_index_needs_token; build_cve's repository and root calls, which confirm the type, are made either way): an unauthenticated address gets 60 GitHub API calls an hour, and an index takes about one per year folder. fetch.github_headers adds the token only to https URLs on GitHub's hosts. Keep the listing bounded (one call per year folder and per folder a pattern names before {year}, every listing answer, the root's included, within CVE_LISTING_MAX_BYTES (constants.sitemapMaxBytes), at most cve_index_cap() entries, the 20,000 map ceiling every type shares) and a blocked file never requested, matched on the archive's own URL for it (library/cve.py). Held by test_tradecraft_cve_index.py.
  • NEVER put Tradecraft text in a run with no active resource, or Library now's rules where it does not run. A prompt text that names the tools follows overlay.offered_catalog() (overlay.py); rules 6 and 7 come only from hints.library_rule through with_step_naming_rule (prompts/base.py), so a run without Library now reads as it does with no library; the block goes at the end of the think call's one system message (hints.with_note), never in a second one, which a single-system-message chat template answers with a 400 that ends the run. Held by test_tradecraft_library_now_prompt.py.
  • NEVER decide which resources a run or a project uses outside catalog.ts. The run catalog and the chat's counter badge both read activeResourcesFor; a second rule anywhere else makes them disagree. On the agent, a run reads its catalog only through runtime.bound_catalog(), never get_setting, whose fallback outside the run's task is whichever project loaded last.
  • NEVER act on the live map without the resource's row lock. A webapp writer that decides on the claim or the live map takes lockOwnResource / lockOwnResourceGeneration first, the lock the agent's swap takes. Failed before: 00530153 (a curation acted on a generation a refresh had just replaced).
  • NEVER retry a Tradecraft model call, or build one for a loop model. An ingestion call carries the tradecraft_ingest purpose and the librarian tradecraft_librarian, both built from the owner's providers (models.py); an Agent in the Loop model is refused before any request. A call the daily budget refuses fails the job so the previous version stays live. Failed before: 97967db9 (a budget-cut refresh replaced a good map).
  • NEVER add a Tradecraft setting outside the spec, or an environment variable. A setting is an entry of settingsSpec.json with its range and ceiling; node webapp/scripts/gen-tradecraft-spec.mjs copies it (and vocab.json) to the agent, which clamps every value again (settings.py). tests/tradecraft_no_new_env_test.sh fails on a new key.
  • ALWAYS give a new Tradecraft table its cascade, its downgrade entry and the agent's name list. onDelete: Cascade from the user and the resource (or project), an entry in DOWNGRADE_TABLES / DOWNGRADE_COLUMNS of rbac-upgrade-preview.mjs, and, when the agent reads or writes it, its names in schema_columns.py. Failed before: three tables added with no DOWNGRADE_TABLES entry left the upgrade-preview test red.
  • ALWAYS reach the web through net.py and time through clock.py. They are the package's only boundaries (test_tradecraft_fetcher_contract.py holds it), so every test can swap both.

Read the full file on GitHub · 182 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. 10d ago First seen · 182 lines · 176 tokens per session scan A 07d70a99c35f

Subscribe to this mod's changes

tradecraft-library is a skill published in the GitHub repository samugit83/redamon (3,544 stars, last pushed yesterday), licensed MIT. It adds 176 tokens to every session and 3,655 once invoked, about $0.0007 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-11-20.

Related

tradecraft-library compared with skills from other repositories

tradecraft-library next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tradecraft-librarysamugit83/redamonSkill3.5kyesterdayMITA176Claude Code, Codex
notion-toolxuiltul/animaworksSkill267yesterdayApache-2.0A52Claude Code, Codex
stripe-projectsstripe/aiSkill2.1k5d agoMITC213Claude Code
migration-and-contract-reviewmakifbaysal/tasktrooperSkill123todayApache-2.0A33Claude Code, Codex
principle-make-operations-idempotentwatt-mind/factorySkill24yesterdayApache-2.0A43Claude Code
pagination-and-filteringtmj-90/gafferSkill1yesterdayApache-2.0A95Claude Code, Codex
jvm-server-frameworksjxoesneon/CielSkill11mo agoApache-2.0A24Claude Code, Codex