agentic-workflow
Practical AI agent workflows and productivity techniques. Provides optimized patterns for daily development tasks such as commands, shortcuts, Git integration, MCP usage, and session management.
What this skill does
# AI Agent Workflow (Workflow & Productivity)
## When to use this skill
- Optimize everyday AI agent work
- Integrate Git/GitHub workflows
- Use MCP servers
- Manage and recover sessions
- Apply productivity techniques
---
## 1. Key commands by agent
### Claude Code commands
| Command | Function | When to use |
|--------|------|----------|
| `/init` | Auto-generate a CLAUDE.md draft | Start a new project |
| `/usage` | Show token usage/reset time | Start of every session |
| `/clear` | Clear conversation history | When context is polluted; start a new task |
| `/context` | Context window X-Ray | When performance degrades |
| `/clone` | Clone the entire conversation | A/B experiments; backups |
| `/mcp` | Manage MCP servers | Enable/disable MCP |
| `!cmd` | Run immediately without Claude processing | Quick status checks |
### Gemini CLI commands
| Command | Function |
|--------|------|
| `gemini` | Start a conversation |
| `@file` | Add file context |
| `-m model` | Select model |
### Codex CLI commands
| Command | Function |
|--------|------|
| `codex` | Start a conversation |
| `codex run` | Run a command |
---
## 2. Keyboard shortcuts (Claude Code)
### Essential shortcuts
| Shortcut | Function | Importance |
|--------|------|--------|
| `Esc Esc` | Cancel the last task immediately | Highest |
| `Ctrl+R` | Search prompt history | High |
| `Shift+Tab` x2 | Toggle plan mode | High |
| `Tab` / `Enter` | Accept prompt suggestion | Medium |
| `Ctrl+B` | Send to background | Medium |
| `Ctrl+G` | Edit in external editor | Low |
### Editor editing shortcuts
| Shortcut | Function |
|--------|------|
| `Ctrl+A` | Move to start of line |
| `Ctrl+E` | Move to end of line |
| `Ctrl+W` | Delete previous word |
| `Ctrl+U` | Delete to start of line |
| `Ctrl+K` | Delete to end of line |
---
## 3. Session management
### Claude Code sessions
```bash
# Continue the last conversation
claude --continue
# Resume a specific session
claude --resume <session-name>
# Name the session during the conversation
/rename stripe-integration
```
### Recommended aliases
```bash
# ~/.zshrc or ~/.bashrc
alias c='claude'
alias cc='claude --continue'
alias cr='claude --resume'
alias g='gemini'
alias cx='codex'
```
---
## 4. Git workflow
### Auto-generate commit messages
```
"Analyze the changes, write an appropriate commit message, then commit"
```
### Auto-generate draft PR
```
"Create a draft PR from the current branch's changes.
Make the title summarize the changes, and list the key changes in the body."
```
### Use Git worktrees
```bash
# Work on multiple branches simultaneously
git worktree add ../myapp-feature-auth feature/auth
git worktree add ../myapp-hotfix hotfix/critical-bug
# Independent AI sessions per worktree
Tab 1: ~/myapp-feature-auth → new feature development
Tab 2: ~/myapp-hotfix → urgent bug fix
Tab 3: ~/myapp (main) → keep main branch
```
### PR review workflow
```
1. "Run gh pr checkout 123 and summarize this PR's changes"
2. "Analyze changes in src/auth/middleware.ts. Check for security issues or performance problems"
3. "Is there a way to make this logic more efficient?"
4. "Apply the improvements you suggested and run tests"
```
---
## 5. Using MCP servers (Multi-Agent)
### Key MCP servers
| MCP server | Function | Use case |
|----------|------|------|
| Playwright | Control web browser | E2E tests |
| Supabase | Database queries | Direct DB access |
| Firecrawl | Web crawling | Data collection |
| Gemini-CLI | Large-scale analysis | 1M+ token analysis |
| Codex-CLI | Run commands | Build, deploy |
### MCP usage examples
```bash
# Gemini: large-scale analysis
> ask-gemini "@src/ Analyze the structure of the entire codebase"
# Codex: run commands
> shell "docker-compose up -d"
> shell "npm test && npm run build"
```
### MCP optimization
```bash
# Disable unused MCP servers
/mcp
# Recommended numbers
# - MCP servers: fewer than 10
# - Active tools: fewer than 80
```
---
## 6. Multi-Agent workflow patterns
### Orchestration pattern
```
[Claude] Plan → [Gemini] Analysis/research → [Claude] Write code → [Codex] Run/test → [Claude] Synthesize results
```
### Practical example: API design + implementation + testing
```
1. [Claude] Design API spec using the skill
2. [Gemini] ask-gemini "@src/ Analyze existing API patterns" - large-scale codebase analysis
3. [Claude] Implement code based on the analysis
4. [Codex] shell "npm test && npm run build" - test and build
5. [Claude] Create final report
```
### TDD workflow
```
"Work using TDD. First write a failing test,
then write code that makes the test pass."
# The AI:
# 1. Write a failing test
# 2. git commit -m "Add failing test for user auth"
# 3. Write minimal code to pass the test
# 4. Run tests → confirm they pass
# 5. git commit -m "Implement user auth to pass test"
```
---
## 7. Container workflow
### Docker container setup
```dockerfile
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
curl git tmux vim nodejs npm python3 python3-pip
RUN curl -fsSL https://claude.ai/install.sh | sh
WORKDIR /workspace
CMD ["/bin/bash"]
```
### Safe experimentation environment
```bash
# Build and run the container
docker build -t ai-sandbox .
docker run -it --rm \
-v $(pwd):/workspace \
-e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
ai-sandbox
# Do experimental work inside the container
```
---
## 8. Troubleshooting
### When context is overloaded
```bash
/context # Check usage
/clear # Reset context
# Or create HANDOFF.md and start a new session
```
### Cancel a task
```
Esc Esc # Cancel the last task immediately
```
### When performance degrades
```bash
# Check MCP/tool counts
/mcp
# Disable unnecessary MCP servers
# Reset context
```
---
## Quick Reference Card
```
=== Essential commands ===
/clear reset context
/context check usage
/usage check tokens
/init generate project description file
!command run immediately
=== Shortcuts ===
Esc Esc cancel task
Ctrl+R search history
Shift+Tab×2 plan mode
Ctrl+B background
=== CLI flags ===
--continue continue conversation
--resume resume session
-p "prompt" headless mode
=== Multi-Agent ===
Claude plan/code generation
Gemini large-scale analysis
Codex run commands
=== Troubleshooting ===
Context overloaded → /clear
Cancel task → Esc Esc
Performance degradation → check /context
```
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.