aiskillstore/marketplace / skills/0xdarkmatter/python-cli-patterns
python-cli-patterns
UnverifiedCLI application patterns for Python. Triggers on: cli, command line, typer, click, argparse, terminal, rich, console, terminal ui.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.0 KB |
| assets/cli-template.py | script | 6.4 KB |
| references/configuration.md | markdown | 7.2 KB |
| references/rich-output.md | markdown | 5.9 KB |
| references/typer-patterns.md | markdown | 6.6 KB |
| skill-report.json | config | 54.9 KB |
skill-report.json
View on GitHub{
"schema_version": "2.0",
"meta": {
"generated_at": "2026-07-04T16:46:37.791Z",
"slug": "0xdarkmatter-python-cli-patterns",
"source_url": "https://github.com/0xDarkMatter/claude-mods/tree/main/skills/python-cli-patterns",
"source_ref": "main",
"model": "codex",
"analysis_version": "3.0.0",
"source_type": "community",
"content_hash": "90f2f7659899b02494f25b5329f63a6f0c5e9bca3e99ef5866f70f5491f113c4",
"tree_hash": "85e1e1cbc577ed7cdb730041c160722f63954960ad4dd79eb86b42f45b7a8e2e",
"provenance": {
"model_requested": "gpt-5.5:high",
"model_effective": "codex:gpt-5.5:high",
"fallback_chain": [
{
"agent": "codex",
"model": "gpt-5.5",
"effort": "high",
"outcome": "success"
}
],
"analysis_version": "3.0.0"
}
},
"skill": {
"name": "python-cli-patterns",
"description": "Reusable Python CLI patterns for Typer and Rich, covering commands, options, Rich output, configuration loading, tests, and a starter template.",
"summary": "Design modern Python command-line tools with Typer, Rich, configuration patterns, and testing examples.",
"icon": "📦",
"version": "1.0.0",
"author": "0xDarkMatter",
"license": "MIT",
"tags": [
"python",
"cli",
"typer",
"rich",
"configuration"
],
"supported_tools": [
"claude",
"codex",
"claude-code"
],
"risk_factors": [
"filesystem",
"env_access",
"scripts",
"network",
"external_commands"
],
"category": "coding"
},
"security_audit": {
"risk_level": "high",
"is_blocked": false,
"safe_to_publish": false,
"analysis_status": "ok",
"summary": "Most static findings are false positives caused by Markdown examples that mention environment variables, hidden XDG paths, database URLs, and code fences. No prompt injection or credential exfiltration intent was found in the reviewed source files. One semantic issue remains: a Typer query example executes raw SQL supplied as a CLI argument.",
"remediation": [
{
"issue": "Raw SQL command example",
"suggestion": "Replace the free-form SQL command with named operations or parameterized queries. Mark any administrative query tool as trusted-only.",
"severity": "high"
},
{
"issue": "Secret configuration examples",
"suggestion": "Add notes that passwords, API keys, and database URLs must not be printed, logged, or included in generated output.",
"severity": "low"
},
{
"issue": "Hidden configuration directory examples",
"suggestion": "Tell generated CLIs to display the resolved config path before creating files in home-directory config locations.",
"severity": "low"
}
],
"risk_factor_evidence": [
{
"factor": "filesystem",
"evidence": [
{
"file": "references/configuration.md",
"line_start": 292,
"line_end": 292
},
{
"file": "references/configuration.md",
"line_start": 293,
"line_end": 293
},
{
"file": "references/configuration.md",
"line_start": 294,
"line_end": 294
},
{
"file": "references/configuration.md",
"line_start": 292,
"line_end": 292
},
{
"file": "references/configuration.md",
"line_start": 293,
"line_end": 293
},
{
"file": "references/configuration.md",
"line_start": 294,
"line_end": 294
}
]
},
{
"factor": "env_access",
"evidence": [
{
"file": "references/configuration.md",
"line_start": 138,
"line_end": 138
},
{
"file": "references/configuration.md",
"line_start": 140,
"line_end": 140
},
{
"file": "references/configuration.md",
"line_start": 150,
"line_end": 150
},
{
"file": "references/configuration.md",
"line_start": 152,
"line_end": 152
},
{
"file": "references/configuration.md",
"line_start": 162,
"line_end": 162
},
{
"file": "references/configuration.md",
"line_start": 164,
"line_end": 164
},
{
"file": "references/configuration.md",
"line_start": 249,
"line_end": 249
},
{
"file": "references/configuration.md",
"line_start": 29,
"line_end": 29
},
{
"file": "references/configuration.md",
"line_start": 113,
"line_end": 113
},
{
"file": "references/configuration.md",
"line_start": 115,
"line_end": 115
},
{
"file": "references/configuration.md",
"line_start": 117,
"line_end": 117
},
{
"file": "references/typer-patterns.md",
"line_start": 169,
"line_end": 169
},
{
"file": "references/typer-patterns.md",
"line_start": 281,
"line_end": 281
}
]
},
{
"factor": "scripts",
"evidence": [
{
"file": "references/rich-output.md",
"line_start": 79,
"line_end": 87
}
]
},
{
"factor": "network",
"evidence": [
{
"file": "references/typer-patterns.md",
"line_start": 238,
"line_end": 238
}
]
},
{
"factor": "external_commands",
"evidence": [
{
"file": "SKILL.md",
"line_start": 16,
"line_end": 40
},
{
"file": "SKILL.md",
"line_start": 40,
"line_end": 44
},
{
"file": "SKILL.md",
"line_start": 44,
"line_end": 69
},
{
"file": "SKILL.md",
"line_start": 69,
"line_end": 73
},
{
"file": "SKILL.md",
"line_start": 73,
"line_end": 106
},
{
"file": "SKILL.md",
"line_start": 106,
"line_end": 110
},
{
"file": "SKILL.md",
"line_start": 110,
"line_end": 132
},
{
"file": "SKILL.md",
"line_start": 132,
"line_end": 138
},
{
"file": "SKILL.md",
"line_start": 138,
"line_end": 139
},
{
"file": "SKILL.md",
"line_start": 139,
"line_end": 140
},
{
"file": "SKILL.md",
"line_start": 140,
"line_end": 141
},
{
"file": "SKILL.md",
"line_start": 141,
"line_end": 142
},
{
"file": "SKILL.md",
"line_start": 142,
"line_end": 143
},
{
"file": "SKILL.md",
"line_start": 143,
"line_end": 147
},
{
"file": "SKILL.md",
"line_start": 147,
"line_end": 147
},
{
"file": "SKILL.md",
"line_start": 148,
"line_end": 149
},
{
"file": "SKILL.md",
"line_start": 149,
"line_end": 150
},
{
"file": "SKILL.md",
"line_start": 150,
"line_end": 154
},
{
"file": "SKILL.md",
"line_start": 154,
"line_end": 155
},
{
"file": "SKILL.md",
"line_start": 155,
"line_end": 156
},
{
"file": "SKILL.md",
"line_start": 156,
"line_end": 160
},
{
"file": "SKILL.md",
"line_start": 160,
"line_end": 167
},
{
"file": "SKILL.md",
"line_start": 167,
"line_end": 168
},
{
"file": "SKILL.md",
"line_start": 168,
"line_end": 171
}
]
}
],
"static_findings": [
{
"id": "filesystem:references/configuration.md:292:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "references/configuration.md",
"line_start": 292,
"line_end": 292,
"snippet": "| `XDG_CONFIG_HOME` | Config files | `~/.config` |"
},
{
"id": "filesystem:references/configuration.md:293:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "references/configuration.md",
"line_start": 293,
"line_end": 293,
"snippet": "| `XDG_DATA_HOME` | Persistent data | `~/.local/share` |"
},
{
"id": "filesystem:references/configuration.md:294:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "references/configuration.md",
"line_start": 294,
"line_end": 294,
"snippet": "| `XDG_CACHE_HOME` | Cache | `~/.cache` |"
},
{
"id": "filesystem:references/configuration.md:292:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/configuration.md",
"line_start": 292,
"line_end": 292,
"snippet": "| `XDG_CONFIG_HOME` | Config files | `~/.config` |"
},
{
"id": "filesystem:references/configuration.md:293:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/configuration.md",
"line_start": 293,
"line_end": 293,
"snippet": "| `XDG_DATA_HOME` | Persistent data | `~/.local/share` |"
},
{
"id": "filesystem:references/configuration.md:294:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/configuration.md",
"line_start": 294,
"line_end": 294,
"snippet": "| `XDG_CACHE_HOME` | Cache | `~/.cache` |"
},
{
"id": "env_access:references/configuration.md:138:python-environment-access",
"category": "env_access",
"severity": "low",
"pattern": "Python environment access",
"file": "references/configuration.md",
"line_start": 138,
"line_end": 138,
"snippet": "base = Path(os.environ.get(\"APPDATA\", Path.home()))"
},
{
"id": "env_access:references/configuration.md:140:python-environment-access",
"category": "env_access",
"severity": "low",
"pattern": "Python environment access",
"file": "references/configuration.md",
"line_start": 140,
"line_end": 140,
"snippet": "base = Path(os.environ.get(\"XDG_CONFIG_HOME\", Path.home() / \".config\"))"
},
{
"id": "env_access:references/configuration.md:150:python-environment-access",
"category": "env_access",
"severity": "low",
"pattern": "Python environment access",
"file": "references/configuration.md",
"line_start": 150,
"line_end": 150,
"snippet": "base = Path(os.environ.get(\"LOCALAPPDATA\", Path.home()))"
},
{
"id": "env_access:references/configuration.md:152:python-environment-access",
"category": "env_access",
"severity": "low",
"pattern": "Python environment access",
"file": "references/configuration.md",
"line_start": 152,
"line_end": 152,
"snippet": "base = Path(os.environ.get(\"XDG_DATA_HOME\", Path.home() / \".local\" / \"share\"))"
},
{
"id": "env_access:references/configuration.md:162:python-environment-access",
"category": "env_access",
"severity": "low",
"pattern": "Python environment access",
"file": "references/configuration.md",
"line_start": 162,
"line_end": 162,
"snippet": "base = Path(os.environ.get(\"LOCALAPPDATA\", Path.home())) / \"cache\""
},
{
"id": "env_access:references/configuration.md:164:python-environment-access",
"category": "env_access",
"severity": "low",
"pattern": "Python environment access",
"file": "references/configuration.md",
"line_start": 164,
"line_end": 164,
"snippet": "base = Path(os.environ.get(\"XDG_CACHE_HOME\", Path.home() / \".cache\"))"
},
{
"id": "env_access:references/configuration.md:249:python-environment-access",
"category": "env_access",
"severity": "low",
"pattern": "Python environment access",
"file": "references/configuration.md",
"line_start": 249,
"line_end": 249,
"snippet": "if value := os.environ.get(env_var):"
},
{
"id": "env_access:references/configuration.md:29:database-connection-strings",
"category": "env_access",
"severity": "high",
"pattern": "Database connection strings",
"file": "references/configuration.md",
"line_start": 29,
"line_end": 29,
"snippet": "envvar=[\"DB_PASSWORD\", \"DATABASE_PASSWORD\", \"PGPASSWORD\"],"
},
{
"id": "env_access:references/configuration.md:113:database-connection-strings",
"category": "env_access",
"severity": "high",
"pattern": "Database connection strings",
"file": "references/configuration.md",
"line_start": 113,
"line_end": 113,
"snippet": "database_url: str = Field("
},
{
"id": "env_access:references/configuration.md:115:database-connection-strings",
"category": "env_access",
"severity": "high",
"pattern": "Database connection strings",
"file": "references/configuration.md",
"line_start": 115,
"line_end": 115,
"snippet": "validation_alias=\"DATABASE_URL\", # Also check DATABASE_URL without prefix"
},
{
"id": "env_access:references/configuration.md:117:generic-api-secret-keys",
"category": "env_access",
"severity": "high",
"pattern": "Generic API/secret keys",
"file": "references/configuration.md",
"line_start": 117,
"line_end": 117,
"snippet": "api_key: str = Field(default=\"\")"
},
{
"id": "sensitive:references/configuration.md:104:environment-file-access",
"category": "sensitive",
"severity": "high",
"pattern": "Environment file access",
"file": "references/configuration.md",
"line_start": 104,
"line_end": 104,
"snippet": "env_file=\".env\","
},
{
"id": "sensitive:references/configuration.md:114:sqlite-database-file",
"category": "sensitive",
"severity": "medium",
"pattern": "SQLite database file",
"file": "references/configuration.md",
"line_start": 114,
"line_end": 114,
"snippet": "default=\"sqlite:///app.db\","
},
{
"id": "sensitive:references/configuration.md:202:sqlite-database-file",
"category": "sensitive",
"severity": "medium",
"pattern": "SQLite database file",
"file": "references/configuration.md",
"line_start": 202,
"line_end": 202,
"snippet": "url = \"sqlite:///app.db\""
},
{
"id": "scripts:references/rich-output.md:79:dynamic-import-expression",
"category": "scripts",
"severity": "medium",
"pattern": "Dynamic import() expression",
"file": "references/rich-output.md",
"line_start": 79,
"line_end": 87,
"snippet": "from rich.progress import ("
},
{
"id": "network:references/typer-patterns.md:238:fetch-api-call",
"category": "network",
"severity": "low",
"pattern": "Fetch API call",
"file": "references/typer-patterns.md",
"line_start": 238,
"line_end": 238,
"snippet": "def fetch():"
},
{
"id": "env_access:references/typer-patterns.md:169:database-connection-strings",
"category": "env_access",
"severity": "high",
"pattern": "Database connection strings",
"file": "references/typer-patterns.md",
"line_start": 169,
"line_end": 169,
"snippet": "db_url: str = typer.Option(\"sqlite:///app.db\", envvar=\"DATABASE_URL\"),"
},
{
"id": "env_access:references/typer-patterns.md:281:database-connection-strings",
"category": "env_access",
"severity": "high",
"pattern": "Database connection strings",
"file": "references/typer-patterns.md",
"line_start": 281,
"line_end": 281,
"snippet": "env={\"DATABASE_URL\": \"sqlite:///test.db\"}"
},
{
"id": "sensitive:references/typer-patterns.md:158:sqlite-database-file",
"category": "sensitive",
"severity": "medium",
"pattern": "SQLite database file",
"file": "references/typer-patterns.md",
"line_start": 158,
"line_end": 158,
"snippet": "self.db_url = db_url"
},
{
"id": "sensitive:references/typer-patterns.md:160:sqlite-database-file",
"category": "sensitive",
"severity": "medium",
"pattern": "SQLite database file",
"file": "references/typer-patterns.md",
"line_start": 160,
"line_end": 160,
"snippet": "self.db = None"
},
{
"id": "sensitive:references/typer-patterns.md:163:sqlite-database-file",
"category": "sensitive",
"severity": "medium",
"pattern": "SQLite database file",
"file": "references/typer-patterns.md",
"line_start": 163,
"line_end": 163,
"snippet": "self.db = create_connection(self.db_url)"
},
{
"id": "sensitive:references/typer-patterns.md:169:sqlite-database-file",
"category": "sensitive",
"severity": "medium",
"pattern": "SQLite database file",
"file": "references/typer-patterns.md",
"line_start": 169,
"line_end": 169,
"snippet": "db_url: str = typer.Option(\"sqlite:///app.db\", envvar=\"DATABASE_URL\"),"
},
{
"id": "sensitive:references/typer-patterns.md:183:sqlite-database-file",
"category": "sensitive",
"severity": "medium",
"pattern": "SQLite database file",
"file": "references/typer-patterns.md",
"line_start": 183,
"line_end": 183,
"snippet": "result = ctx.obj.db.execute(sql)"
},
{
"id": "sensitive:references/typer-patterns.md:281:sqlite-database-file",
"category": "sensitive",
"severity": "medium",
"pattern": "SQLite database file",
"file": "references/typer-patterns.md",
"line_start": 281,
"line_end": 281,
"snippet": "env={\"DATABASE_URL\": \"sqlite:///test.db\"}"
},
{
"id": "external_commands:SKILL.md:16:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 16,
"line_end": 40,
"snippet": "```python"
},
{
"id": "external_commands:SKILL.md:40:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 40,
"line_end": 44,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:44:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 44,
"line_end": 69,
"snippet": "```python"
},
{
"id": "external_commands:SKILL.md:69:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 69,
"line_end": 73,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:73:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 73,
"line_end": 106,
"snippet": "```python"
},
{
"id": "external_commands:SKILL.md:106:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 106,
"line_end": 110,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:110:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 110,
"line_end": 132,
"snippet": "```python"
},
{
"id": "external_commands:SKILL.md:132:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 132,
"line_end": 138,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:138:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 138,
"line_end": 139,
"snippet": "| Required arg | `name: str` |"
},
{
"id": "external_commands:SKILL.md:139:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 139,
"line_end": 140,
"snippet": "| Optional arg | `name: str = \"default\"` |"
},
{
"id": "external_commands:SKILL.md:140:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 140,
"line_end": 141,
"snippet": "| Option | `typer.Option(default, \"--flag\", \"-f\")` |"
},
{
"id": "external_commands:SKILL.md:141:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 141,
"line_end": 142,
"snippet": "| Argument | `typer.Argument(..., help=\"...\")` |"
},
{
"id": "external_commands:SKILL.md:142:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 142,
"line_end": 143,
"snippet": "| Boolean flag | `verbose: bool = False` |"
},
{
"id": "external_commands:SKILL.md:143:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 143,
"line_end": 147,
"snippet": "| Enum choice | `color: Color = Color.red` |"
},
{
"id": "external_commands:SKILL.md:147:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 147,
"line_end": 147,
"snippet": "| Table | `Table()` + `add_column/row` |"
},
{
"id": "external_commands:SKILL.md:148:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 148,
"line_end": 149,
"snippet": "| Progress | `track(items)` |"
},
{
"id": "external_commands:SKILL.md:149:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 149,
"line_end": 150,
"snippet": "| Colors | `[red]text[/red]` |"
},
{
"id": "external_commands:SKILL.md:150:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 150,
"line_end": 154,
"snippet": "| Panel | `Panel(\"content\", title=\"Title\")` |"
},
{
"id": "external_commands:SKILL.md:154:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 154,
"line_end": 155,
"snippet": "- `./references/typer-patterns.md` - Advanced Typer patterns"
},
{
"id": "external_commands:SKILL.md:155:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 155,
"line_end": 156,
"snippet": "- `./references/rich-output.md` - Rich tables, progress, formatting"
},
{
"id": "external_commands:SKILL.md:156:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 156,
"line_end": 160,
"snippet": "- `./references/configuration.md` - Config files, environment variables"
},
{
"id": "external_commands:SKILL.md:160:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 160,
"line_end": 167,
"snippet": "- `./assets/cli-template.py` - Full CLI application template"
},
{
"id": "external_commands:SKILL.md:167:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 167,
"line_end": 168,
"snippet": "- `python-typing-patterns` - Type hints for CLI arguments"
},
{
"id": "external_commands:SKILL.md:168:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 168,
"line_end": 171,
"snippet": "- `python-observability-patterns` - Logging for CLI applications"
}
],
"finding_verdicts": [
{
"id": "filesystem:references/configuration.md:292:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "This line is a Quick Reference row documenting standard XDG defaults, not code that accesses hidden files. It shows app configuration locations with no concealment or exfiltration behavior."
},
{
"id": "filesystem:references/configuration.md:293:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "This line is a Quick Reference row documenting standard XDG defaults, not code that accesses hidden files. It shows app configuration locations with no concealment or exfiltration behavior."
},
{
"id": "filesystem:references/configuration.md:294:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "This line is a Quick Reference row documenting standard XDG defaults, not code that accesses hidden files. It shows app configuration locations with no concealment or exfiltration behavior."
},
{
"id": "filesystem:references/configuration.md:292:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "This line is a Quick Reference row documenting standard XDG defaults, not code that accesses hidden files. It shows app configuration locations with no concealment or exfiltration behavior."
},
{
"id": "filesystem:references/configuration.md:293:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "This line is a Quick Reference row documenting standard XDG defaults, not code that accesses hidden files. It shows app configuration locations with no concealment or exfiltration behavior."
},
{
"id": "filesystem:references/configuration.md:294:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "This line is a Quick Reference row documenting standard XDG defaults, not code that accesses hidden files. It shows app configuration locations with no concealment or exfiltration behavior."
},
{
"id": "env_access:references/configuration.md:138:python-environment-access",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "The example reads standard APPDATA, LOCALAPPDATA, or XDG variables to choose app-specific config directories. It does not access secrets or transmit environment data."
},
{
"id": "env_access:references/configuration.md:140:python-environment-access",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "The example reads standard APPDATA, LOCALAPPDATA, or XDG variables to choose app-specific config directories. It does not access secrets or transmit environment data."
},
{
"id": "env_access:references/configuration.md:150:python-environment-access",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "The example reads standard APPDATA, LOCALAPPDATA, or XDG variables to choose app-specific config directories. It does not access secrets or transmit environment data."
},
{
"id": "env_access:references/configuration.md:152:python-environment-access",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "The example reads standard APPDATA, LOCALAPPDATA, or XDG variables to choose app-specific config directories. It does not access secrets or transmit environment data."
},
{
"id": "env_access:references/configuration.md:162:python-environment-access",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "The example reads standard APPDATA, LOCALAPPDATA, or XDG variables to choose app-specific config directories. It does not access secrets or transmit environment data."
},
{
"id": "env_access:references/configuration.md:164:python-environment-access",
"verdict": "false_positive",
"confidence": 0.97,
"reason": "The example reads standard APPDATA, LOCALAPPDATA, or XDG variables to choose app-specific config directories. It does not access secrets or transmit environment data."
},
{
"id": "env_access:references/configuration.md:249:python-environment-access",
"verdict": "false_positive",
"confidence": 0.96,
"reason": "The code reads allow-listed MYAPP_* variables for documented configuration precedence. It does not enumerate the environment or expose sensitive values."
},
{
"id": "env_access:references/configuration.md:29:database-connection-strings",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "These snippets show standard Typer or Pydantic configuration fields for operator-supplied database and API settings. They do not print, persist, or transmit the values."
},
{
"id": "env_access:references/configuration.md:113:database-connection-strings",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "These snippets show standard Typer or Pydantic configuration fields for operator-supplied database and API settings. They do not print, persist, or transmit the values."
},
{
"id": "env_access:references/configuration.md:115:database-connection-strings",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "These snippets show standard Typer or Pydantic configuration fields for operator-supplied database and API settings. They do not print, persist, or transmit the values."
},
{
"id": "env_access:references/configuration.md:117:generic-api-secret-keys",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "These snippets show standard Typer or Pydantic configuration fields for operator-supplied database and API settings. They do not print, persist, or transmit the values."
},
{
"id": "sensitive:references/configuration.md:104:environment-file-access",
"verdict": "false_positive",
"confidence": 0.96,
"reason": "Pydantic Settings loads a local .env file as application configuration. The example does not read arbitrary files, expose file contents, or send data elsewhere."
},
{
"id": "sensitive:references/configuration.md:114:sqlite-database-file",
"verdict": "false_positive",
"confidence": 0.96,
"reason": "The SQLite URL is a local default inside a configuration example. It is not a hardcoded credential or unauthorized database access by the skill."
},
{
"id": "sensitive:references/configuration.md:202:sqlite-database-file",
"verdict": "false_positive",
"confidence": 0.96,
"reason": "The SQLite URL is a local default inside a configuration example. It is not a hardcoded credential or unauthorized database access by the skill."
},
{
"id": "scripts:references/rich-output.md:79:dynamic-import-expression",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "This is a normal Python import list from rich.progress inside a Markdown example. There is no dynamic import expression or runtime script execution."
},
{
"id": "network:references/typer-patterns.md:238:fetch-api-call",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The token fetch is only a function name in an async Typer example. The function calls local async helpers and asyncio.sleep, with no network request."
},
{
"id": "env_access:references/typer-patterns.md:169:database-connection-strings",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "The snippets use DATABASE_URL as a documented CLI option or test environment value. They do not disclose credentials or connect to an external service by themselves."
},
{
"id": "env_access:references/typer-patterns.md:281:database-connection-strings",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "The snippets use DATABASE_URL as a documented CLI option or test environment value. They do not disclose credentials or connect to an external service by themselves."
},
{
"id": "sensitive:references/typer-patterns.md:158:sqlite-database-file",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "This is a documentation example for local database context setup or CLI testing. The static SQLite-file pattern does not indicate credential exposure or unauthorized file access here."
},
{
"id": "sensitive:references/typer-patterns.md:160:sqlite-database-file",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "This is a documentation example for local database context setup or CLI testing. The static SQLite-file pattern does not indicate credential exposure or unauthorized file access here."
},
{
"id": "sensitive:references/typer-patterns.md:163:sqlite-database-file",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "This is a documentation example for local database context setup or CLI testing. The static SQLite-file pattern does not indicate credential exposure or unauthorized file access here."
},
{
"id": "sensitive:references/typer-patterns.md:169:sqlite-database-file",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "This is a documentation example for local database context setup or CLI testing. The static SQLite-file pattern does not indicate credential exposure or unauthorized file access here."
},
{
"id": "sensitive:references/typer-patterns.md:183:sqlite-database-file",
"verdict": "false_positive",
"confidence": 0.91,
"reason": "The static SQLite-file label is inaccurate for this line because it is database execution, not a database file path. The raw SQL risk is captured separately as a semantic finding."
},
{
"id": "sensitive:references/typer-patterns.md:281:sqlite-database-file",
"verdict": "false_positive",
"confidence": 0.95,
"reason": "This is a documentation example for local database context setup or CLI testing. The static SQLite-file pattern does not indicate credential exposure or unauthorized file access here."
},
{
"id": "external_commands:SKILL.md:16:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:40:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:44:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:69:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:73:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:106:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:110:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:132:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:138:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:139:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:140:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:141:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:142:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:143:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:147:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:148:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:149:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:150:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:154:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:155:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:156:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:160:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:167:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
},
{
"id": "external_commands:SKILL.md:168:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.99,
"reason": "The matched text is Markdown code fences, inline code, or reference links in documentation. It is not Ruby backtick syntax or shell command execution."
}
],
"semantic_findings": [
{
"title": "Raw SQL Execution Example",
"description": "The Typer query example accepts a sql argument from the command line and passes it directly to the database execution method. Generated tools could expose arbitrary database reads or writes if copied into untrusted CLIs.",
"severity": "high",
"locations": [
{
"file": "references/typer-patterns.md",
"line_start": 177,
"line_end": 184
}
],
"confidence": 0.93,
"confidence_reasoning": "The source shows a command argument named sql passed directly to ctx.obj.db.execute. This is a clear unsafe pattern, even though the file is documentation."
}
],
"critical_findings": [],
"high_findings": [
{
"title": "Raw SQL Execution Example",
"description": "The Typer query example accepts a sql argument from the command line and passes it directly to the database execution method. Generated tools could expose arbitrary database reads or writes if copied into untrusted CLIs.",
"locations": [
{
"file": "references/typer-patterns.md",
"line_start": 177,
"line_end": 184
}
],
"review_kind": "security",
"source_category": "semantic",
"source_severity": "high",
"confidence": 0.93,
"confidence_reasoning": "The source shows a command argument named sql passed directly to ctx.obj.db.execute. This is a clear unsafe pattern, even though the file is documentation."
}
],
"medium_findings": [],
"low_findings": [],
"dangerous_patterns": [],
"files_scanned": 5,
"total_lines": 1322,
"audit_model": "codex",
"audited_at": "2026-07-04T16:46:37.791Z",
"agent_auto_install_policy": "confirmation_required",
"manual_install_policy": "allowed"
},
"content": {
"user_title": "Build Python CLI Applications",
"value_statement": "Teams need consistent Python command-line interfaces for options, output, configuration, and tests. This skill provides Typer and Rich patterns for practical, production-ready CLI design.",
"seo_keywords": [
"Claude",
"Codex",
"Claude Code",
"Python CLI",
"Typer patterns",
"Rich terminal output",
"command line applications",
"CLI configuration",
"CliRunner tests",
"terminal UI"
],
"actual_capabilities": [
"Scaffold Typer apps with commands, subcommands, callbacks, options, and arguments.",
"Apply Rich tables, panels, progress bars, markdown rendering, syntax highlighting, and live displays.",
"Model configuration with TOML files, environment variables, Pydantic settings, and XDG directories.",
"Add typed arguments, interactive prompts, async commands, and CliRunner tests.",
"Use the included CLI template as a starting structure for a Python command-line app."
],
"limitations": [
"It provides examples and templates; it does not install dependencies or run commands by itself.",
"Database examples are simplified and need access controls before production use.",
"Examples assume Python 3.10 or newer with Typer and Rich available.",
"It does not cover packaging, distribution, or shell completion deployment in depth."
],
"use_cases": [
{
"title": "Create an internal administration CLI",
"description": "Use command groups, typed options, Rich tables, and local configuration to build admin tools with predictable behavior.",
"target_user": "Backend developers"
},
{
"title": "Improve operational scripts",
"description": "Replace ad hoc scripts with tested Typer commands, progress indicators, and explicit configuration paths.",
"target_user": "DevOps engineers"
},
{
"title": "Add a developer-facing project CLI",
"description": "Expose common project tasks through a polished CLI with validation, help text, and CliRunner tests.",
"target_user": "Library maintainers"
}
],
"prompt_templates": [
{
"title": "Create a Basic CLI",
"scenario": "Beginner setup for one command.",
"prompt": "Create a basic Typer CLI for a project named <name> with one command, typed options, clear help text, and simple errors."
},
{
"title": "Add Rich Output",
"scenario": "Improve command output for scanning.",
"prompt": "Update this CLI plan to use Rich tables, progress feedback, panels, and readable error messages without changing the command behavior."
},
{
"title": "Design Configuration",
"scenario": "Add file and environment settings.",
"prompt": "Design configuration handling for this CLI using TOML, environment variables, explicit paths, and tests for configuration precedence."
},
{
"title": "Refactor a Full CLI",
"scenario": "Advanced architecture review.",
"prompt": "Review this CLI design and propose a Typer architecture with subcommands, layered configuration, Rich output, async handling, and CliRunner tests."
}
],
"output_examples": [
{
"input": "Build a CLI that imports files and shows progress.",
"output": "A command structure with path validation, progress reporting, success messages, error handling, and test scenarios."
},
{
"input": "Add configuration support to an existing Python script.",
"output": "A configuration plan with file defaults, environment overrides, command-line precedence, and visible config paths."
},
{
"input": "Make terminal output easier to scan.",
"output": "A Rich output plan using tables for records, panels for summaries, and clear stderr errors."
}
],
"best_practices": [
"Validate paths and options before doing filesystem work.",
"Keep secrets in environment variables or local config files and avoid printing them.",
"Add CliRunner tests for valid commands, invalid input, and environment-driven configuration."
],
"anti_patterns": [
"Do not execute raw SQL from command-line input unless the tool is strictly trusted.",
"Do not write configuration into hidden home paths without showing the resolved path.",
"Do not mix business logic directly into command callbacks when it should be tested separately."
],
"faq": [
{
"question": "Which Python CLI frameworks does this skill focus on?",
"answer": "It focuses on Typer for command structure and Rich for terminal output."
},
{
"question": "Can it help create a complete CLI application?",
"answer": "Yes. It includes a starter template and examples for commands, configuration, output, and tests."
},
{
"question": "Does it handle secrets safely?",
"answer": "It shows environment-based configuration. Generated CLIs should avoid logging passwords, tokens, or database URLs."
},
{
"question": "Does it include testing guidance?",
"answer": "Yes. It includes CliRunner examples for successful commands, invalid input, options, and environment variables."
},
{
"question": "Is it ready for production use?",
"answer": "Use it as a starting point. Add project-specific validation, authorization, logging, and security review."
},
{
"question": "Does the skill run external commands?",
"answer": "No. The source content is documentation and templates. An agent may write files only when the user asks."
}
]
},
"file_structure": [
{
"name": "assets",
"type": "dir",
"path": "assets",
"children": [
{
"name": "cli-template.py",
"type": "file",
"path": "assets/cli-template.py",
"lines": 257
}
]
},
{
"name": "references",
"type": "dir",
"path": "references",
"children": [
{
"name": "configuration.md",
"type": "file",
"path": "references/configuration.md",
"lines": 295
},
{
"name": "rich-output.md",
"type": "file",
"path": "references/rich-output.md",
"lines": 294
},
{
"name": "typer-patterns.md",
"type": "file",
"path": "references/typer-patterns.md",
"lines": 304
}
]
},
{
"name": "SKILL.md",
"type": "file",
"path": "SKILL.md",
"lines": 172
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |