Loading...
Loading...
ALWAYS LOAD THIS SKILL when: something doesn't work as expected, documentation is unclear, need to understand library internals, debugging integration issues, or before making assumptions about how a library works. Contains opensrc repo paths, debugging workflows, and examples for Effect, TanStack, TRPC, Drizzle, Better Auth, OpenCode.
npx skill4agent add blogic-cz/blogic-marketplace debugging-with-opensrc# Sync all repos (run after git clone)
bun run opensrc:sync
# Fetch new package
bun run opensrc:use <package> # npm package
bun run opensrc:use owner/repo # GitHub repo| Library | Path | What to look for |
|---|---|---|
| Effect | | Schema, Effect.gen, Layer, Context |
| TanStack Router | | createFileRoute, loader, useParams |
| TanStack Query | | useSuspenseQuery, queryOptions |
| TanStack Form | | useForm, validation |
| TanStack Start | | SSR, server functions |
| TRPC | | procedures, middleware, routers |
| Drizzle ORM | | pgTable, relations, queries |
| Better Auth | | auth config, plugins, sessions |
| OpenCode | | skills, commands, plugins |
| Pino | | logger, transports |
| Sentry | | SDK, integrations, tracing |
Error: "X is not a function" or "Cannot read property Y"
→ Find where X/Y is defined in source code# Use CK semantic search to find in opensrc
mcp_ck_semantic_search(
query="useSuspenseQuery implementation",
path="opensrc/repos/github.com/TanStack/"
)
# Or grep for specific function
mcp_grep(
pattern="export function useSuspenseQuery",
path="opensrc/repos/github.com/TanStack/"
)# Read the actual source file
mcp_read(filePath="opensrc/repos/github.com/TanStack/query/packages/react-query/src/useSuspenseQuery.ts")BAD: Search web for "TanStack Form validation issue"
GOOD:
1. Read opensrc/repos/github.com/TanStack/form/packages/react-form/src/useForm.ts
2. Find validator interface and expected return type
3. Check how Standard Schema integration works
4. Fix based on actual implementation1. Read opensrc/repos/github.com/trpc/trpc/packages/server/src/core/middleware.ts
2. Understand how context flows through middleware chain
3. Check if .use() returns opts.next() correctly1. Read opensrc/repos/github.com/Effect-TS/effect/packages/effect/src/Layer.ts
2. Understand Layer.effect vs Layer.succeed
3. Check Context.Tag usage patterns1. Read opensrc/repos/github.com/sst/opencode/packages/opencode/src/
2. Find skill loading logic
3. Check frontmatter parsing and description matching
4. Run `opencode debug skill` to verify1. Read opensrc/repos/github.com/better-auth/better-auth/packages/better-auth/src/
2. Find session handling logic
3. Check cookie configuration and storageProblem: useSuspenseQuery returns undefined even though data is in cache
Step 1: Check TanStack Query source
→ Read opensrc/repos/github.com/TanStack/query/packages/react-query/src/useSuspenseQuery.ts
Step 2: Find the issue
→ Discover that useSuspenseQuery requires queryOptions() wrapper, not raw object
Step 3: Verify in project
→ Check how other components use it successfully
Step 4: Fix
→ Change from trpc.x.useQuery() to useSuspenseQuery(trpc.x.queryOptions())# Test with specific model (use perl timeout for non-interactive)
perl -e 'alarm 120; exec @ARGV' opencode run -m anthropic/claude-sonnet-4-5 --format json "your test prompt" 2>&1
# Examples:
# Test database skill autoloading
perl -e 'alarm 120; exec @ARGV' opencode run -m anthropic/claude-sonnet-4-5 --format json "potrebujem vytvorit novu tabulku v databaze" 2>&1
# Test auth skill
perl -e 'alarm 120; exec @ARGV' opencode run -m anthropic/claude-sonnet-4-5 --format json "ako pridam protected procedure pre admin" 2>&1# List all available skills (verify skill is registered)
opencode debug skill
# Check OpenCode version
opencode --version
# Run with different models
opencode run -m anthropic/claude-sonnet-4-5 "message"
opencode run -m anthropic/claude-opus-4 "message".opencode/skill/<skill-name>/
├── SKILL.md # Main skill file with frontmatter
└── references/ # Optional additional docs
├── examples.md
└── patterns.md---
name: skill-name
description: "ALWAYS LOAD THIS SKILL when: keyword1, keyword2, keyword3. Contains X, Y, Z."
---
# Skill Title
## Content...description"ALWAYS LOAD THIS SKILL when: ...""LOAD THIS SKILL when: ...""tool":"skill"# Look for skill loading in output
perl -e 'alarm 120; exec @ARGV' opencode run -m anthropic/claude-sonnet-4-5 --format json "test prompt" 2>&1 | grep -A5 '"tool":"skill"'opensrc/repos/github.com/sst/opencode/packages/opencode/src/
├── skill/ # Skill loading and management
├── command/ # Custom commands
├── plugin/ # Plugin system
├── session/ # Session management
└── provider/ # Model providers