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.
npx agentmods add skills/destynova2/cli-code-skills/cli-audit-shellnpx skills add Destynova2/cli-code-skills --skill cli-audit-shellgit clone --depth 1 https://github.com/Destynova2/cli-code-skillsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00179 | $0.02699 |
| Opus 5 | $0.00089 | $0.01350 |
| Sonnet 5 | $0.00036 | $0.00540 |
| Haiku 4.5 | $0.00018 | $0.00270 |
Grade A, and why
cli-audit-shell 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optimization: This skill uses on-demand loading. Heavy content lives in
references/and is loaded only when needed.
Language rule: Skill instructions are written in English. This skill targets Bash scripts exclusively. When generating user-facing output, detect the project's primary language (from README, comments, docs, commit messages) and produce the report in that language. If the project is bilingual, ask the user which language to use before proceeding.
Audit Shell — Shell Quality Index (SQI)
"Shell should only be used for small utilities or simple wrapper scripts." — Google Shell Style Guide
Core Principles
- Evidence-based — every finding needs a
file:linereference. No vague "the script could be better" - Proportional — a 500-line script doing LVM partitioning matters more than a 10-line wrapper. Scale to script complexity
- Beyond shellcheck — shellcheck catches syntax; this skill catches semantic anti-patterns (dead code under
set -e, redundant package checks, injections in heredocs) - Named anti-patterns — use the anti-pattern names from
references/anti-patterns.mdin findings - Positive reinforcement — always highlight good practices found
- Complexity-adapted tooling — simple problems deserve simple tools (sed), complex problems deserve proper tools (kustomize). Read
references/tooling-ladder.md - Gotchas — read
../gotchas.mdbefore producing output to avoid known mistakes
Input
$ARGUMENTS is the target to audit (file path, directory, or empty for auto-detect).
- If a specific
.shfile: audit that file deeply - If a directory: audit all
.shfiles and shebanged scripts in it - If empty: find all shell scripts in the project (glob
**/*.sh+ grep#!/bin/bashor#!/usr/bin/env bash)
12-Dimension Framework
Score each dimension 0.0-1.0, then compute a weighted SQI. Read references/categories.md for detailed checklists per category.
| # | Category | Weight | Key question |
|---|---|---|---|
| S1 | Strict Mode Coherence | 12% | Is set -euo pipefail used AND is code compatible with it? No dead fallbacks? |
| S2 | Error Surfaces & Return Values | 12% | Are return values checked? No || true? No swallowed 2>/dev/null? |
| S3 | Logging & Observability | 8% | Uses logger(1) or structured output? Timestamps? Severity levels? |
| S4 | Stderr Hygiene | 5% | Errors to stderr, output to stdout? No blanket 2>/dev/null? |
| S5 | Variable Discipline | 10% | local in functions? No unquoted expansions? No injection in heredocs? |
| S6 | Quoting & Expansion | 8% | "${var}" not $var? Arrays for lists? "$@" not $*? |
| S7 | Control Flow & Structure | 8% | main() pattern? Functions near top? Early returns? Max depth 3? |
| S8 | Naming Conventions | 5% | lower_snake_case functions? UPPER_CASE constants? :: for packages? |
| S9 | CLI Ergonomics | 10% | getopts/getopt for options? --help? Single entry point vs N scripts? S9 follows the canonical surface mapping in ../shared/cli-ergonomics.md (Laws 1-3 applied to shell). |
| S10 | Idempotency & Safety | 10% | Check-before-create? No destructive assumptions? readonly for constants? |
| S11 | Namespace & Env Hygiene | 7% | Env vars prefixed by project? No global pollution? local everywhere? |
| S12 | Security & Injection | 5% | No eval? No unquoted user input in commands? No shell injection in env blocks? |
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.
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.
- 2d ago First seen · 201 lines · 179 tokens per session scan A 283da0e69af4
cli-audit-shell is a skill published in the GitHub repository Destynova2/cli-code-skills (5 stars, last pushed 10d ago), licensed MIT. It adds 179 tokens to every session and 2,699 once invoked, about $0.0009 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.
Other skills, from other repositories
clean-architecture
Apply Robert C. Martin's Clean Architecture, SOLID, and component-decoupling principles when designing, reviewing, or refactoring code — scaled correctly to the size of the task so trivial changes don't get over-engineered. Use this whenever the user asks to design a new feature/service, review code for architectural…
sdlc
Full SDLC workflow for implementing features, fixing bugs, refactoring code, testing, releasing, publishing, and deploying. Use this skill when implementing, fixing, refactoring, testing, adding features, building new code, or releasing/publishing/deploying.
feedback
Submit feedback, bug reports, feature requests, or share SDLC patterns you've discovered. Privacy-first — always asks before scanning.
deploy
Deploy the application to production.
claude-setup-wizard
Setup wizard — scans codebase, builds confidence per data point, only asks what it can't figure out, generates SDLC files. Use for first-time setup or re-running setup.
claude-update-wizard
Smart update for SDLC wizard — shows changelog, compares files, lets you selectively adopt changes while preserving customizations.