Claude Code — Terminal AI Coding Agent

## Overview

25 stars

Best use case

Claude Code — Terminal AI Coding Agent is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

## Overview

Teams using Claude Code — Terminal AI Coding Agent should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/claude-code/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/TerminalSkills/skills/claude-code/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/claude-code/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Claude Code — Terminal AI Coding Agent Compares

Feature / AgentClaude Code — Terminal AI Coding AgentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

## Overview

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Claude Code — Terminal AI Coding Agent

## Overview

You are an expert in Claude Code, Anthropic's agentic coding assistant that runs in the terminal. You help developers configure CLAUDE.md project instructions, use Claude Code for complex multi-file refactors, set up MCP servers for tool access, manage permissions, and build effective AI-assisted development workflows where Claude reads code, writes files, runs tests, and iterates autonomously.

## Instructions

### Setup and Configuration

```bash
# Install
npm install -g @anthropic-ai/claude-code

# Start in any project directory
cd my-project
claude

# Claude reads the codebase, understands the project structure,
# and enters an interactive conversation where it can:
# - Read and write files
# - Run shell commands
# - Search the codebase
# - Create and apply diffs
# - Run tests and fix failures
```

### CLAUDE.md — Project Instructions

```markdown
<!-- CLAUDE.md at project root — Claude reads this automatically -->

# Project: FinPay API

## Architecture
- Next.js 15 App Router, TypeScript strict
- Drizzle ORM + PostgreSQL
- Stripe for payments
- BullMQ for background jobs
- Vitest + Testing Library for tests

## Commands
- `pnpm dev` — Start development server
- `pnpm test:unit` — Run unit tests
- `pnpm typecheck` — TypeScript check
- `pnpm lint` — ESLint
- `pnpm db:migrate` — Run Drizzle migrations
- `pnpm db:studio` — Open Drizzle Studio

## Code Conventions
- Result pattern for errors (never throw in business logic)
- Zod schemas for all external data validation
- Structured logging with Pino (no console.log)
- Feature flags via src/lib/flags.ts
- All database queries through Drizzle, never raw SQL

## Before Making Changes
1. Read the relevant test file
2. Run existing tests for the module
3. After changes: `pnpm typecheck && pnpm test:unit`

## Do NOT
- Add dependencies without asking
- Modify database schema without creating a migration
- Change auth logic without approval
- Commit directly — create a branch and PR
```

```markdown
<!-- CLAUDE.md files can be nested -->
<!-- src/payments/CLAUDE.md — specific to payment module -->

# Payment Module

Stripe is the payment provider. All Stripe API calls go through
src/lib/stripe/client.ts which wraps the Stripe SDK with retry
logic and structured error handling.

## Important: Webhook Idempotency
Every webhook handler MUST check idempotency_key before processing.
Stripe can send the same event multiple times. We store processed
event IDs in the stripe_events table.

## Test Card Numbers
- 4242424242424242 — successful payment
- 4000000000000002 — declined
- 4000000000009995 — insufficient funds
```

### Usage Patterns

```bash
# Complex refactor — Claude reads, plans, edits, tests
$ claude
> Refactor the payment webhook handler. It's currently a 400-line
> switch statement in src/app/api/webhooks/stripe/route.ts. Extract
> each event type into a separate handler in src/lib/stripe/handlers/.
> Each handler should validate with Zod, update the DB, and queue
> side effects. Then update the tests.

# Claude will:
# 1. Read the current webhook handler
# 2. Read existing test files
# 3. Create handler files for each event type
# 4. Write Zod schemas for event data
# 5. Update the main route to dispatch to handlers
# 6. Write tests for each handler
# 7. Run typecheck + tests, fix any issues

# Bug investigation — Claude reads logs, traces code, finds root cause
$ claude
> Users report that subscription upgrades aren't applying immediately.
> Check the upgrade flow in src/lib/stripe/handlers/subscription-updated.ts
> and the webhook logs in our Sentry MCP server.

# One-shot mode — no interactive session
$ claude -p "Add input validation to all API routes in src/app/api/ that
  are missing Zod schema validation. Run typecheck when done."

# Pipe input
$ cat error.log | claude -p "Analyze this error log and suggest a fix"
```

### MCP Servers

```json
// ~/.claude/mcp.json — Global MCP servers
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/dev/projects"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "ghp_xxx" }
    }
  }
}
```

```json
// .mcp.json — Project-specific MCP servers (committed to repo)
{
  "mcpServers": {
    "database": {
      "command": "npx",
      "args": ["tsx", "mcp-servers/database/index.ts"],
      "env": { "DATABASE_URL": "postgresql://localhost:5432/finpay_dev" }
    }
  }
}
```

### Permissions and Safety

```bash
# Claude asks permission before:
# - Writing or deleting files
# - Running shell commands
# - Making network requests

# Permission modes:
claude --allowedTools "Edit,Read,Bash(pnpm test*)"  # Whitelist specific tools
claude --dangerouslySkipPermissions                   # Skip all permission checks (CI only)

# In CI/CD:
# CLAUDE.md + --dangerouslySkipPermissions + trust boundary = automated code review
```

## Examples

**Example 1: User asks to set up claude-code**

User: "Help me set up claude-code for my project"

The agent should:
1. Check system requirements and prerequisites
2. Install or configure claude-code
3. Set up initial project structure
4. Verify the setup works correctly

**Example 2: User asks to build a feature with claude-code**

User: "Create a dashboard using claude-code"

The agent should:
1. Scaffold the component or configuration
2. Connect to the appropriate data source
3. Implement the requested feature
4. Test and validate the output

## Guidelines

1. **CLAUDE.md is critical** — Write detailed project instructions; Claude reads them before every session; this is your leverage
2. **Nested CLAUDE.md** — Place module-specific instructions in subdirectories; Claude reads the nearest CLAUDE.md for context
3. **Verify with tests** — End instructions with "run typecheck and tests"; Claude iterates until everything passes
4. **MCP for context** — Connect databases, GitHub, Sentry via MCP; Claude makes better decisions with real data
5. **One-shot for CI** — Use `claude -p` in CI pipelines for automated code review, migration generation, and test writing
6. **Branch workflow** — Instruct Claude to create branches and PRs; never commit directly to main
7. **Incremental trust** — Start with full permission prompts; whitelist tools as you build confidence in the workflow
8. **Session continuity** — Claude remembers the conversation within a session; build context before asking for complex changes

Related Skills

rigorous-coding

25
from ComeOnOliver/skillshub

Apply rigorous coding standards. Use when writing, implementing, or reviewing code.

write-coding-standards-from-file

25
from ComeOnOliver/skillshub

Write a coding standards document for a project using the coding styles from the file(s) and/or folder(s) passed as arguments in the prompt.

stream-coding

25
from ComeOnOliver/skillshub

Documentation-first development methodology. The goal is AI-ready documentation - when docs are clear enough, code generation becomes automatic. Triggers on "Build", "Create", "Implement", "Document", or "Spec out". Version 3.5 adds Phase 2.5 Adversarial Review and renames internal verification to Spec Gate (structural completeness). Clarity Gate is now a separate standalone tool for epistemic quality.

Coding Agent (bash-first)

25
from ComeOnOliver/skillshub

Use **bash** (with optional background mode) for all coding agent work. Simple and effective.

continue-claude-work

25
from ComeOnOliver/skillshub

Recover actionable context from local `.claude` session artifacts and continue interrupted work without running `claude --resume`. This skill should be used when the user provides a Claude session ID, asks to continue prior work from local history, or wants to inspect `.claude` files before resuming implementation.

claude-skills-troubleshooting

25
from ComeOnOliver/skillshub

Diagnose and resolve Claude Code plugin and skill issues. This skill should be used when plugins are installed but not showing in available skills list, skills are not activating as expected, or when troubleshooting enabledPlugins configuration in settings.json. Triggers include "plugin not working", "skill not showing", "installed but disabled", or "enabledPlugins" issues.

claude-md-progressive-disclosurer

25
from ComeOnOliver/skillshub

Optimize CLAUDE.md files using progressive disclosure. Goal: Maximize information efficiency, readability, and maintainability. Use when: User wants to optimize CLAUDE.md, information is duplicated across files, or LLM repeatedly fails to follow rules.

fixing-claude-export-conversations

25
from ComeOnOliver/skillshub

Fixes broken line wrapping in Claude Code exported conversation files (.txt), reconstructing tables, paragraphs, paths, and tool calls that were hard-wrapped at fixed column widths. Includes an automated validation suite (generic, file-agnostic checks). Triggers when the user has a Claude Code export file with broken formatting, mentions "fix export", "fix conversation", "exported conversation", "make export readable", references a file matching YYYY-MM-DD-HHMMSS-*.txt, or has a .txt file with broken tables, split paths, or mangled tool output from Claude Code.

claude-code-history-files-finder

25
from ComeOnOliver/skillshub

Finds and recovers content from Claude Code session history files. This skill should be used when searching for deleted files, tracking changes across sessions, analyzing conversation history, or recovering code from previous Claude interactions. Triggers include mentions of "session history", "recover deleted", "find in history", "previous conversation", or ".claude/projects".

terminal-session

25
from ComeOnOliver/skillshub

tmux 持久化终端会话控制。通过向 tmux 发送按键、读取输出,管理 Claude Code、Codex、SSH 等长时间运行的交互式进程。跨多轮对话保持进程状态。需预装 tmux(Linux/macOS 默认提供;Windows 用户需 WSL2)。

claude-md-enhancer

25
from ComeOnOliver/skillshub

Analyzes, generates, and enhances CLAUDE.md files for any project type using best practices, modular architecture support, and tech stack customization. Use when setting up new projects, improving existing CLAUDE.md files, or establishing AI-assisted development standards.

running-claude-code-via-litellm-copilot

25
from ComeOnOliver/skillshub

Use when routing Claude Code through a local LiteLLM proxy to GitHub Copilot, reducing direct Anthropic spend, configuring ANTHROPIC_BASE_URL or ANTHROPIC_MODEL overrides, or troubleshooting Copilot proxy setup failures such as model-not-found, no localhost traffic, or GitHub 401/403 auth errors.