Agent skill
devvit-docs
Look up Devvit documentation from the reddit/devvit-docs repository. Use when the user asks about Devvit APIs, patterns, configuration, or examples (trigger phrases: "how do I", "devvit docs", "show me the docs", "API reference").
Install this agent skill to your Project
npx add-skill https://github.com/reddit/devvit-skills/tree/main/skills/devvit-docs
SKILL.md
Devvit Docs
Look up Devvit documentation from reddit/devvit-docs.
Constraints:
- Use only
reddit/devvit-docsas the source of truth. - Do not use other repos, forks, blog posts, or web search results.
- If the answer isn't found, say so and cite the closest relevant file.
How It Works
- Run the
ensure-docs.jsscript to clone or refresh the local docs cache. - Read the JSON output to get the docs directory path.
- Search that directory to answer the user's question.
- Cite specific files/sections in your answer.
Usage
node ./scripts/ensure-docs.cjs [--force] [--ttl <hours>] [--project-dir <path>]
Script path is relative to this skill's directory.
--force— Pull regardless of cache age--ttl <hours>— Cache TTL in hours (default: 24)--project-dir <path>— User's project root for version detection (default: cwd)
Examples:
node ./scripts/ensure-docs.cjs
node ./scripts/ensure-docs.cjs --force
Output
{
"docsRoot": "node_modules/.cache/devvit-docs/versioned_docs/version-0.11",
"repoDir": "node_modules/.cache/devvit-docs",
"appDevvitVersion": "0.11"
}
docsRoot— The directory to search. Versioned if a matching version was found, otherwisedocs/.repoDir— Root of the cloned repo (use as fallback if versioned docs are incomplete).appDevvitVersion— Devvit version from the user'spackage.json, ornull.
Present Results to User
- Quote the specific doc file and section supporting each claim.
- Provide a minimal code example if the docs include one.
- If the docs don't cover it, say so and suggest the closest material found.
Troubleshooting
gitnot found — Requiresgiton PATH.- Network errors — Script uses existing cache if pull fails.
- Stale docs — Use
--forceto bypass the TTL cache.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
devvit-skill-setup
Configure a repo's agent instruction files (AGENTS.md, CLAUDE.md, etc.) to auto-apply Devvit skill guidance. Trigger phrases: "configure skills", "setup skills", "add devvit docs rule".
devvit-logs
Stream Devvit logs for an installed app (trigger phrases: "devvit logs", "stream logs", "check logs", "show logs"). Requires the user to provide the target subreddit.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
Didn't find tool you were looking for?