From devac
Creates and maintains docs/package-effects.md for classifying code effects discovered via devac effects init, with verification and TypeScript mapping sync.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devac:define-effectsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Help developers create and maintain `docs/package-effects.md` - the source of truth for effect classification in a package.
Help developers create and maintain docs/package-effects.md - the source of truth for effect classification in a package.
From foundation.md: "Everything can be represented as effectHandlers"
runCode() === handleEffects(extractEffects(code))
DO:
devac effects initDON'T:
This skill activates when users ask about:
Analyze code to find patterns that represent effects:
Help developers classify discovered patterns into meaningful effect categories with proper metadata.
Compare documented effects against actual code to find gaps and stale mappings.
# Generate initial package-effects.md from AST analysis
devac effects init -p <package-path>
This creates a draft docs/package-effects.md with discovered patterns.
Open docs/package-effects.md and:
# Compare documented vs actual effects
devac effects verify -p <package-path>
Reports:
# Generate TypeScript extraction rules
devac effects sync -p <package-path>
Generates .devac/effect-mappings.ts from the documentation.
devac effects initGenerate initial docs/package-effects.md from code analysis.
devac effects init -p packages/user-service
devac effects init -p packages/user-service --threshold 3
devac effects verifyCheck if documented effects match actual code patterns.
devac effects verify -p packages/user-service
devac effects verify -p packages/user-service --json
devac effects syncGenerate .devac/effect-mappings.ts from documentation.
devac effects sync -p packages/user-service
devac effects listList all extracted effects in a package.
devac effects list -p packages/user-service
devac effects list -p packages/user-service --type Store
docs/package-effects.md# Package Effects: @myorg/user-service
<!--
This file defines effect mappings for this package.
Run `devac effects sync` to regenerate extraction rules.
Run `devac effects verify` to check for unmapped patterns.
-->
## Metadata
- **Package:** @myorg/user-service
- **Last Updated:** 2025-01-01
- **Verified:** true
## Store Operations
| Pattern | Store Type | Operation | Provider | Target |
|---------|------------|-----------|----------|--------|
| `userRepo.create` | database | insert | mysql | users |
| `userRepo.update` | database | update | mysql | users |
| `sessionCache.set` | cache | write | redis | sessions |
## Retrieve Operations
| Pattern | Retrieve Type | Operation | Provider | Target |
|---------|---------------|-----------|----------|--------|
| `userRepo.findById` | database | get | mysql | users |
| `sessionCache.get` | cache | read | redis | sessions |
## External Calls
| Pattern | Send Type | Service | Third Party |
|---------|-----------|---------|-------------|
| `stripeClient.*` | external | stripe | true |
| `sendgrid.send` | external | sendgrid | true |
## Request Handlers
| Class.Method | HTTP Method | Route | Framework |
|--------------|-------------|-------|-----------|
| `UserController.getUser` | GET | /users/:id | express |
| `UserController.createUser` | POST | /users | express |
User: "Help me define effects for the payment-service package"
Response approach:
devac effects init -p packages/payment-service to discover patternsdocs/package-effects.mdstripeClient.charges.create)devac effects verify to check for gapsdevac effects sync to generate extraction rulesUser: "The verify command shows unmapped patterns"
Response approach:
docs/package-effects.md with metadataProperly defined effects enable accurate C4 architecture diagrams:
# Generate C4 diagrams using effect data
devac c4 -p packages/user-service --level containers
Effects are classified and appear in diagrams:
Use these standard group types for classification:
| Group | Description | Filter Use |
|---|---|---|
io:filesystem | File system operations (fs.*, glob) | Architecture docs |
io:database | Database operations (DuckDB, SQL) | Data flow diagrams |
io:network | External calls, HTTP, subprocess | Integration docs |
compute:utility | Pure transformations (path., JSON., Date.*) | Usually filtered |
compute:transform | Data transformations | Internal only |
framework:cli | CLI framework patterns (Commander.js) | Usually filtered |
framework:test | Test framework patterns (Vitest, Jest) | Usually filtered |
logging:diagnostic | Logging (console., logger.) | Usually filtered |
workflow:hub | Hub federation operations | Workflow docs |
When generating docs or diagrams, filter by group:
io:* groupsworkflow:* groupsdevac effects init to get ALL patternsdevac effects verify in CI to catch drift - goal is 0 unmapped/explain-package skillnpx claudepluginhub pietgk/vivief --plugin devacProvides expert guidance on Effect-TS patterns including services, layers, error handling, service composition, and refactoring code with 'effect' imports. Covers Effect + Next.js integration.
Generates C4 architecture documentation (Context, Container, Component, Code levels) for existing repositories using bottom-up analysis from code subdirectories. Outputs to C4-Documentation/ directory.
Runs a 7-phase codebase analysis using typegraph-mcp tools, producing a detailed architectural report. Useful when onboarding to an unfamiliar codebase or before making significant changes.