designing-apis
Guides REST and GraphQL API design, endpoint patterns, request/response schemas, versioning, and API best practices. Use when…
Guides systematic project analysis, codebase exploration, and architecture pattern recognition. Use when understanding new codebases, onboarding to projects, or investigating system structure.
Claude Code
$ npx -y skills add cloudai-x/opencode-workflow --skill analyzing-projects --agent claude-code
Codex
$ npx skills add cloudai-x/opencode-workflow --skill analyzing-projects -a codex -y
Cursor
$ npx skills add cloudai-x/opencode-workflow --skill analyzing-projects -a cursor -y
Gemini CLI
$ npx skills add cloudai-x/opencode-workflow --skill analyzing-projects -a gemini-cli -y
GitHub Copilot
$ npx skills add cloudai-x/opencode-workflow --skill analyzing-projects -a github-copilot -y
OpenCode
$ npx skills add cloudai-x/opencode-workflow --skill analyzing-projects -a opencode -y
Windsurf
$ npx skills add cloudai-x/opencode-workflow --skill analyzing-projects -a windsurf -y
name: analyzing-projects description: Guides systematic project analysis, codebase exploration, and architecture pattern recognition. Use when understanding new codebases, onboarding to projects, or investigating system structure. license: MIT compatibility: opencode metadata: category: exploration audience: developers
Systematic approaches to understanding codebases, identifying patterns, and mapping system architecture.
---
Layer 1: Surface Scan └─ Entry points, config files, directory structure Layer 2: Dependency Mapping └─ Package managers, imports, module relationships Layer 3: Architecture Recognition └─ Patterns (MVC, hexagonal, microservices) Layer 4: Flow Tracing └─ Request paths, data flow, state management Layer 5: Quality Assessment └─ Test coverage, code health, technical debt
---
Start by identifying how the application launches:
1. **Look for standard entry files**:
2. **Check configuration files**:
3. **Map directory structure**:
Quick heuristics: ├── src/ → Source code ├── lib/ → Internal libraries ├── pkg/ → Public packages (Go) ├── internal/ → Private packages (Go) ├── tests/ → Test files ├── docs/ → Documentation ├── scripts/ → Build/deploy scripts └── config/ → Configuration
---
| File | Ecosystem | Key Sections | |------|-----------|--------------| | `package.json` | Node.js | dependencies, devDependencies | | `requirements.txt` / `pyproject.toml` | Python | direct dependencies | | `go.mod` | Go | require blocks | | `Cargo.toml` | Rust | dependencies | | `pom.xml` / `build.gradle` | Java | dependencies |
1. **Trace imports** from entry points 2. **Build a mental model** of layers:
Presentation Layer (routes, controllers, views)
↓
Application Layer (services, use cases)
↓
Domain Layer (entities, business logic)
↓
Infrastructure Layer (database, external APIs)3. **Identify shared utilities** imported across modules
---
| Pattern | Indicators | Typical Structure | |---------|------------|-------------------| | **MVC** | controllers/, models/, views/ | Clear separation of concerns | | **Hexagonal** | ports/, adapters/, domain/ | Dependency inversion | | **Microservices** | services/, docker-compose | Independent deployable units | | **Monolith** | Single large app, shared DB | Everything in one deployment | | **Serverless** | functions/, handlers/ | Event-driven, stateless |
---
For web applications, trace a request end-to-end:
HTTP Request
↓
Router/Routes (maps URL → handler)
↓
Middleware (auth, logging, validation)
↓
Controller/Handler (orchestrates)
↓
Service/Use Case (business logic)
↓
Repository/DAO (data access)
↓
Database/External APIFor frontend applications:
---
| Indicator | Good Sign | Warning Sign | |-----------|-----------|--------------| | Test coverage | >70% coverage | No tests, or tests ignored | | Dependencies | Recent versions | Major versions behind | | Documentation | README updated | Stale or missing docs | | Build time | Under 2 minutes | Over 10 minutes | | Error handling | Consistent patterns | Swallowed exceptions |
---
1. Find where the bug manifests 2. Trace back to the root cause 3. Understand the affected area only 4. Check for related tests
1. Find similar existing features 2. Understand the patterns they use 3. Map the modules that need changes 4. Identify integration points
1. Complete all 5 phases 2. Document architecture decisions 3. Create a mental map of key flows 4. Identify ownership areas
---
When exploring a large codebase, parallelize by module:
Spawn subagents for each major area: ├─ Subagent 1: Analyze src/auth (authentication module) ├─ Subagent 2: Analyze src/api (API layer) ├─ Subagent 3: Analyze src/db (data layer) ├─ Subagent 4: Analyze src/ui (frontend) └─ Subagent 5: Analyze tests/ (test patterns) Synthesize findings into unified architecture view.
---
## Project Overview - **Language**: [Primary language] - **Framework**: [Main framework] - **Architecture**: [Pattern identified] - **Entry Poin
A universal OpenCode workflow setup with specialized agents, skills, commands, and plugins for any software project.
Guides REST and GraphQL API design, endpoint patterns, request/response schemas, versioning, and API best practices. Use when…
Guides software architecture decisions, design patterns, and system design principles. Use when designing systems, choosing…
Guides test strategy, TDD/BDD approaches, test coverage planning, and testing best practices. Use when designing test suites,…
Guides git workflows, branching strategies, commit conventions, and version control best practices. Use when managing…
Guides performance optimization, profiling techniques, and bottleneck identification. Use when improving application speed,…
CRITICAL skill for executing multiple Task tool calls in a SINGLE message for true parallelism. Essential for efficient…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration