add-module

A checklist for adding a new public module or sub-package to console-toolkit, a JavaScript software library. It covers source files, types, tests, documentation, and project records.

In plain words
What is it for?
Use it to add a module, write its automated tests and type declarations, update documentation, and run the project’s checks.
Why use it?
It reduces missed files and inconsistent project updates when extending the library.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/uhop/console-toolkit/add-module
Any agent
npx skills add uhop/console-toolkit --skill add-module
Clone the repo
git clone --depth 1 https://github.com/uhop/console-toolkit

Made for: Claude Code, Codex.

Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 583 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00017 $0.00583
Opus 5 $0.00009 $0.00292
Sonnet 5 $0.00003 $0.00117
Haiku 4.5 $0.00002 $0.00058

Measured yesterday against content hash 9f601eb9c4d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-module 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 yesterday.

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.

.claude/skills/add-module/SKILL.md · 47 lines

How it starts

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

Add a New Module

Follow these steps when adding a new public module or sub-package.

Top-level module (e.g., src/foo.js)

  1. Create src/foo.js with the implementation.
    • ESM only. Use .js extensions in all imports.
    • No runtime dependencies.
    • No JSDoc — API contracts live in src/foo.d.ts.
  2. Create src/foo.d.ts with hand-written type declarations and JSDoc.
  3. Create tests/test-foo.js with automated tests (tape-six).
  4. Run the new test: node tests/test-foo.js
  5. No exports entry is needed — the ./* wildcard already exposes the module as console-toolkit/foo.js. Do not add file-shape substitutions like "./foo": "./src/foo.js".
  6. Create wiki/Module:-foo.md with usage documentation.
  7. Add a link to the new wiki page in wiki/Home.md.
  8. Update ARCHITECTURE.md — add the module to the project layout tree and dependency graph if applicable.
  9. Update llms.txt and llms-full.txt with a brief description of the new module.
  10. Update AGENTS.md if the module changes the architecture quick reference.
  11. Verify: npm test
  12. Verify: npm run ts-check
  13. Verify: npm run lint

Sub-package (e.g., src/foo/index.js)

  1. Create src/foo/index.js as the main entry point.
    • Re-export sub-modules as needed.
  2. Create src/foo/index.d.ts with hand-written type declarations.
  3. Create individual sub-module files under src/foo/.
    • Each sub-module gets its own .d.ts file if it has a public API.
  4. Create tests/test-foo.js with automated tests.
  5. Run the new test: node tests/test-foo.js
  6. Add an exports entry in package.json: "./foo": "./src/foo/index.js".
  7. Create wiki/Package:-foo.md with usage documentation.
  8. Add a link to the new wiki page in wiki/Home.md.
  9. Update ARCHITECTURE.md — add the package to the project layout tree and dependency graph.
  10. Update llms.txt and llms-full.txt.
  11. Update AGENTS.md if the package changes the architecture quick reference.
  12. Verify: npm test
  13. Verify: npm run ts-check
  14. Verify: npm run lint

Read the full file on GitHub · 47 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. yesterday First seen · 47 lines · 17 tokens per session scan A 9f601eb9c4d1

Subscribe to this mod's changes

add-module is a skill published in the GitHub repository uhop/console-toolkit (10 stars, last pushed 1mo ago), licensed BSD-3-Clause. It adds 17 tokens to every session and 583 once invoked, about $0.0001 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-31.