Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills/DevOps & CI/CD
https-deeplearning-ai avatar

Adding Cli Command

https-deeplearning-ai/sc-agent-skills-files

If you're building a Typer CLI and want consistency across commands, this gives you three battle-tested templates: single commands that take arguments directly, command groups for subcommands like `db migrate`, and destructive operations with confirmation flows. It handles the registration boilerplate in `__init__.py` and enforces conventions like using Annotated types, proper exit codes, and routing all output through a display module. The destructive template is solid, it won't let you forget the `--force` flag or confirmation prompt. One constraint: it assumes you've already got a storage and display module set up. Good for teams that want their CLI commands to look like they were written by the same person.

GitHub stars
1.3K
last updated
Jun 8, 2026
View on GitHubSave

Install

$ npx -y skills add https-deeplearning-ai/sc-agent-skills-files --skill adding-cli-command --agent claude-code

Installs into .claude/skills of the current project.

Files

Adding CLI Commands

Templates and workflow for adding or updating Typer CLI commands.

<cli_app> refers to the name of your CLI application (e.g., task, myapp, todo).

Workflow

  1. Identify command type (single command, command group, or destructive)
  2. Create file in src/<cli_app>/commands/<command>.py
  3. Use appropriate template below
  4. Register in src/<cli_app>/commands/__init__.py

Template A: Single Command

For commands taking arguments directly (<cli_app> add "item").

import typer
from typing import Annotated

from <cli_app>.storage import add_task
from <cli_app>.display import display
from <cli_app>.constants import EXIT_INVALID_INPUT

app = typer.Typer()


@app.command()
def add(
    title: Annotated[str, typer.Argument(help="task title")],
    priority: Annotated[str, typer.Option("--priority", "-p", help="priority level")] = "low",
):
    """Add a new task."""
    if not title.strip():
        display.error("Title cannot be empty")
        raise typer.Exit(EXIT_INVALID_INPUT)

    task = add_task(title=title, priority=priority)
    display.success(f"Added '{task.title}'")

Template B: Command Group

For commands with subcommands (<cli_app> db migrate, <cli_app> db status).

import typer

from <cli_app>.storage import storage
from <cli_app>.display import display

app = typer.Typer(help="Database operations.")


@app.command()
def migrate():
    """Run database migrations."""
    storage.migrate()
    display.success("Migrations complete")


@app.command()
def status():
    """Show database status."""
    info = storage.get_status()
    display.info(f"Version: {info.version}")

Template C: Destructive Command

For deletion with confirmation.

import typer
from typing import Annotated

from <cli_app>.storage import get_task, delete_task
from <cli_app>.display import display
from <cli_app>.constants import EXIT_ERROR

app = typer.Typer()


@app.command()
def clear(
    task_id: Annotated[int, typer.Argument(help="task ID to delete")],
    force: Annotated[bool, typer.Option("--force", "-f", help="skip confirmation")] = False,
):
    """Delete a task permanently."""
    task = get_task(task_id)
    if not task:
        display.error(f"Task {task_id} not found")
        raise typer.Exit(EXIT_ERROR)

    if not force:
        confirm = typer.confirm(f"Delete '{task.title}'?", default=False)
        if not confirm:
            display.info("Cancelled")
            raise typer.Abort()

    delete_task(task_id)
    display.success(f"Deleted '{task.title}'")

Registration

Register in commands/__init__.py:

import typer

from .add import app as add_app
from .clear import app as clear_app

app = typer.Typer(help="<cli_app> CLI.", no_args_is_help=True)

# Single commands - add WITHOUT name
app.add_typer(add_app)
app.add_typer(clear_app)

# Command groups - add WITH name
# app.add_typer(db_app, name="db")

Conventions

RuleExample
ArgumentsAnnotated[str, typer.Argument(help="...")]
OptionsAnnotated[str, typer.Option("--name", "-n", help="...")]
DocstringsImperative mood, < 60 chars
OutputAlways via display module
Exit codes0=success, 1=error, 2=invalid
DestructiveMust have --force flag, default=False confirmation

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Details

Repository
github.com/https-deeplearning-ai/sc-agent-skills-files
Categories
DevOps & CI/CD, AI & Agent Building, CLI & Terminal
First seen
Jun 11, 2026

More from https-deeplearning-ai/sc-agent-skills-files

All 4
  • Generating Cli Tests
  • Learning A Tool
  • Reviewing Cli Command

Recommended

More DevOps & CI/CD
1hypnguyen1209 avatarcloud-securityhypnguyen1209/offensive-claudeCloud penetration testing — AWS/Azure/GCP privilege escalation, container escape, Kubernetes attacks, serverless exploitation, IaC misconfigurations0installs
2hypnguyen1209 avatarmalware-analysishypnguyen1209/offensive-claudeStatic/dynamic malware analysis, YARA rules, sandbox evasion detection, behavioral profiling, unpacking, anti-analysis bypass0installs
3jdrhyne avatarsalesforcejdrhyne/agent-skillsQuery and manage Salesforce CRM data via the Salesforce CLI (`sf`). Run SOQL/SOSL queries, inspect object schemas, create/update/delete records, bulk import/exp0installs
4jdrhyne avatartask-orchestratorjdrhyne/agent-skillsAutonomous multi-agent task orchestration with dependency analysis, parallel tmux/Codex execution, and self-healing heartbeat monitoring. Use for large projects0installs
5JetBrains avatarchangelogJetBrains/ideavimMaintains IdeaVim changelog (CHANGES.md) and build.gradle.kts changeNotes. Use when updating changelog, documenting releases, or reviewing commits/PRs for chang0installs
6jezweb avatarOpenAI Apps MCPjezweb/claude-skillsBuild ChatGPT apps with MCP servers on Cloudflare Workers. Extend ChatGPT with custom tools and interactive widgets (HTML/JS UI). Use when: developing ChatGPT e0installs