Golang Patterns
affaan-m/ECC
Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization.
Creates a new CLI command following the Commander.js pattern in src/commands/.
$ npx skills add caliber-ai-org/ai-setup --skill adding-a-command -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install caliber-ai-org/ai-setup adding-a-command --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/caliber-ai-org/ai-setup.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/adding-a-command .claude/skills/adding-a-command && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "adding-a-command" agent skill from https://github.com/caliber-ai-org/ai-setup/tree/master/skills/adding-a-command into .claude/skills/adding-a-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-a-command", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/caliber-ai-org/ai-setup/tree/master/skills/adding-a-commandType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add caliber-ai-org/ai-setup --skill adding-a-command -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install caliber-ai-org/ai-setup adding-a-command --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/caliber-ai-org/ai-setup.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/adding-a-command .agents/skills/adding-a-command && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "adding-a-command" agent skill from https://github.com/caliber-ai-org/ai-setup/tree/master/skills/adding-a-command into .agents/skills/adding-a-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-a-command", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add caliber-ai-org/ai-setup --skill adding-a-command -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install caliber-ai-org/ai-setup adding-a-command --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/caliber-ai-org/ai-setup.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/adding-a-command .cursor/skills/adding-a-command && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "adding-a-command" agent skill from https://github.com/caliber-ai-org/ai-setup/tree/master/skills/adding-a-command into .cursor/skills/adding-a-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-a-command", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/caliber-ai-org/ai-setup.git --path skills/adding-a-command--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add caliber-ai-org/ai-setup --skill adding-a-command -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install caliber-ai-org/ai-setup adding-a-command --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/caliber-ai-org/ai-setup.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/adding-a-command .gemini/skills/adding-a-command && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "adding-a-command" agent skill from https://github.com/caliber-ai-org/ai-setup/tree/master/skills/adding-a-command into .gemini/skills/adding-a-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-a-command", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install caliber-ai-org/ai-setup adding-a-commandInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add caliber-ai-org/ai-setup --skill adding-a-command -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/caliber-ai-org/ai-setup.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/adding-a-command .github/skills/adding-a-command && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "adding-a-command" agent skill from https://github.com/caliber-ai-org/ai-setup/tree/master/skills/adding-a-command into .github/skills/adding-a-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-a-command", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add caliber-ai-org/ai-setup --skill adding-a-command -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install caliber-ai-org/ai-setup adding-a-command --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/caliber-ai-org/ai-setup.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/adding-a-command .opencode/skills/adding-a-command && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "adding-a-command" agent skill from https://github.com/caliber-ai-org/ai-setup/tree/master/skills/adding-a-command into .opencode/skills/adding-a-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-a-command", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
adding-a-commandCreates a new CLI command following the Commander.js pattern in src/commands/.
Adding A Command is an agent skill from caliber-ai-org/ai-setup. Creates a new CLI command following the Commander.js pattern in src/commands/. Handles command registration in src/cli.ts, telemetry tracking via tracked() wrapper, and option parsing. Use when user says add command, new CLI command, create subcommand, or adds files to src/commands/. Do NOT use for modifying existing commands or fixing bugs in existing commands.
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: Continuously sync your AI setups with one command. Codebase tailor suited agent skills, MCPs and config files for Claude Code, Cursor, and Codex. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f5dbc00. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Adding A Command loads about 2k tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 671 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from caliber-ai-org/ai-setup at commit f5dbc00, republished under its MIT licence (© caliber-ai-org). 671 words, ~1,978 tokens.
.claude/skills/adding-a-command/SKILL.md (or your agent's skills folder).export async function myCommand(options?: OptionType). Never use default exports..command() chain in src/cli.ts, wrapped with tracked() for telemetry.throw new Error('__exit__') to exit gracefully without printing the error message. Use chalk for user-facing messages.Create the command file at src/commands/{commandName}.ts with named async export.
export async function {commandName}Command(options?: { optionName?: optionType }) { ... }Handle errors consistently: Wrap error-prone operations in try/catch. Distinguish between user errors and system errors:
console.error(chalk.red('message')); throw new Error('__exit__');throw new Error('Detailed error message'); — this will print and exit with code 1..fail() before throwing.Import and register in src/cli.ts in the correct location:
import { {commandName}Command } from './commands/{commandName}.js';sources)..command('{kebab-name}').description('...').option(...).action(tracked('{kebab-name}', {commandName}Command))sources add): sources.command('add').description(...).action(tracked('sources:add', sourcesAddCommand))tracked('{command-name}', handler) for automatic telemetry.Define options (if needed):
.option() chains before .action(): .option('--flag', 'Description') or .option('--opt <value>', 'Description').option('--opt <value>', 'Description', parseFunction).action(tracked('name', (opts) => command(opts)))Verify before proceeding:
new Error('__exit__') for user errors.User says: "Add a command to show config status"
Actions taken:
Result: caliber status displays config status; caliber status --json outputs JSON.
Code example:
import chalk from 'chalk';
import { loadConfig } from '../llm/config.js';
export async function statusCommand(options?: { json?: boolean }) {
const config = loadConfig();
if (options?.json) {
console.log(JSON.stringify({ configured: !!config }, null, 2));
return;
}
console.log(chalk.bold('Status'));
console.log(` LLM: ${chalk.green(config?.provider || 'Not configured')}`);
}Registration in src/cli.ts:
import { statusCommand } from './commands/status.js';
program
.command('status')
.description('Show config status')
.option('--json', 'Output as JSON')
.action(tracked('status', statusCommand));User says: "Add a sources add subcommand"
Actions taken:
Result: caliber sources add ../lib adds a source.
Code example:
export async function sourcesAddCommand(sourcePath: string) {
if (!fs.existsSync(sourcePath)) {
console.log(chalk.red(`Path not found: ${sourcePath}`));
throw new Error('__exit__');
}
const existing = loadSourcesConfig(process.cwd());
existing.push({ type: 'repo', path: sourcePath });
writeSourcesConfig(process.cwd(), existing);
console.log(chalk.green(`Added ${sourcePath}`));
}Registration:
const sources = program.command('sources');
sources
.command('add')
.argument('<path>', 'Path to add')
.action(tracked('sources:add', sourcesAddCommand));User says: "Add init with --agent flag supporting comma-separated values"
Actions taken:
Result: caliber init --agent claude,cursor passes parsed array to handler.
Parser code:
function parseAgentOption(value: string) {
const agents = value.split(',').map(s => s.trim().toLowerCase());
if (agents.length === 0) {
console.error('Invalid agent');
process.exit(1);
}
return agents;
}
program.command('init')
.option('--agent <type>', 'Agents (comma-separated)', parseAgentOption)
.action(tracked('init', initCommand));Issue: "SyntaxError: The requested module does not provide an export named 'myCommand'"
export async function myCommand(...) (not export default).Issue: Command appears in help but crashes when run
tracked() or function import mismatch.tracked('command-name', handler).Issue: "Error: exit" appears in output for user errors
console.error(chalk.red('message')); throw new Error('__exit__'); for user-facing errors.Issue: --dry-run flag not recognized
.option() or wrong camelCase in interface..option('--dry-run', 'Description') and ensure options interface has dryRun?: boolean.Issue: Subcommand crashes but parent command works
program.command() instead of groupVar.command() for subcommands.const sources = program.command('sources'); sources.command('add')...Issue: Telemetry not appearing
tracked() or wrong command name..action(tracked('{kebab-case}', handler)) wraps handler. Use colon for subcommands like 'sources:add'.Issue: "Cannot find module" with relative imports
.ts extension in imports..js extension: import { x } from '../lib/file.js' (required for ESM).© caliber-ai-org, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/adding-a-command of caliber-ai-org/ai-setup.
Open the folder on GitHubat commit f5dbc00
Adding A Command next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Adding A Command this skillcaliber-ai-org/ai-setup | 1.3k | — | ~2k | Automated safety check: Pass | MIT | |
| Golang Patternsaffaan-m/ECC | 276k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Kotlin Exposed Patternsaffaan-m/ECC | 276k | 4 repos | ~5.5k | Automated safety check: Pass | MIT | |
| Dotnet Patternsaffaan-m/ECC | 276k | 1 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Fastapi Patternsaffaan-m/ECC | 276k | — | ~2.3k | Automated safety check: Pass | MIT | |
| Python Patternsaffaan-m/ECC | 276k | — | ~2.3k | Automated safety check: Pass | MIT |
affaan-m/ECC
Go-specific design patterns and best practices including functional options, small interfaces, dependency injection, concurrency patterns, error handling, and package organization.
affaan-m/ECC
JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.
affaan-m/ECC
Idiomatic C and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.
affaan-m/ECC
FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.
affaan-m/ECC
Python-specific design patterns and best practices including protocols, dataclasses, context managers, decorators, async/await, type hints, and package organization.
sickn33/agentic-awesome-skills
Reference document for monopoly patterns. An agent skill from sickn33/agentic-awesome-skills.
caliber-ai-org/ai-setup
Writes Vitest tests following project patterns: tests/ directories, vi.mock() for module mocking with vi.hoisted() for test-time factories, global LLM mock from src/test/setup.ts, environment…
caliber-ai-org/ai-setup
Discovers and installs community skills from the public registry.
caliber-ai-org/ai-setup
Adds a new LLM provider implementing LLMProvider interface with call() and stream() methods.
caliber-ai-org/ai-setup
Saves user instructions as persistent learnings for future sessions.
caliber-ai-org/ai-setup
Add a new deterministic scoring check in src/scoring/checks/ that evaluates config quality.
caliber-ai-org/ai-setup
Sets up Caliber for automatic AI agent context sync. An agent skill from caliber-ai-org/ai-setup.
Creates a new CLI command following the Commander.js pattern in src/commands/. Adding A Command is an agent skill from caliber-ai-org/ai-setup.js pattern in src/commands/.
Adding A Command fits situations like: user says add command; new CLI command; create subcommand; adds files to src/commands/.
Run `npx skills add caliber-ai-org/ai-setup --skill adding-a-command -a claude-code`. Or copy the skill folder (skills/adding-a-command in caliber-ai-org/ai-setup) into .claude/skills/adding-a-command in your project. Claude Code loads it when a task matches its description.
Run `npx skills add caliber-ai-org/ai-setup --skill adding-a-command -a codex`. Or copy the skill folder (skills/adding-a-command in caliber-ai-org/ai-setup) into .agents/skills/adding-a-command in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add caliber-ai-org/ai-setup --skill adding-a-command -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/adding-a-command, .gemini/skills/adding-a-command, .github/skills/adding-a-command and .opencode/skills/adding-a-command in your project.
SKILL.md names no scripts, command-line tools or credentials: Adding A Command is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Adding A Command is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Adding A Command: Golang Patterns (affaan-m/ECC, 276k stars), Kotlin Exposed Patterns (affaan-m/ECC, 276k stars), Dotnet Patterns (affaan-m/ECC, 276k stars) and Fastapi Patterns (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
caliber-ai-org (a GitHub organization) maintains it in caliber-ai-org/ai-setup, which has 1,301 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 24, 2026.
Source: caliber-ai-org/ai-setup on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.