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").
Look up Devvit documentation from reddit/devvit-docs.
Constraints:
reddit/devvit-docs as the source of truth.ensure-docs.js script to clone or refresh the local docs cache.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
{
"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, otherwise docs/.repoDir — Root of the cloned repo (use as fallback if versioned docs are incomplete).appDevvitVersion — Devvit version from the user's package.json, or null.git not found — Requires git on PATH.--force to bypass the TTL cache.