src/orchestrator/plugins/strapi/SKILL.md
Builds Strapi content types, extends controllers and services, implements lifecycle hooks, and configures REST/GraphQL APIs. Use when creating content types, writing custom controllers, developing Strapi plugins, or querying the API.
npx skillsauth add monkilabs/opencastle strapi-cmsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generic Strapi CMS development methodology. For project-specific configuration, content types, and deployment details, see cms-config.md.
content-types directorysrc/api/<type>/controllers/<type>.js with wrapper logic that calls servicessrc/api/<type>/services/ and keep controllers thinbeforeCreate/afterUpdate handlers in src/api/<type>/lifecycles.js for side effectsconfig/env/<env>/populate to include relationsfilters with operators ($eq, $contains, $in, etc.)pagination[page] and pagination[pageSize]fields to select attributesGET with populate and filters (client-side fetch):
// GET /api/articles?populate=author,categories&filters[status][$eq]=published&pagination[page]=1&pagination[pageSize]=10
const res = await fetch('https://cms.example.com/api/articles?populate=author,categories&filters[status][$eq]=published');
const json = await res.json();
console.log(json.data[0].attributes.title);
Custom controller extension (server):
// src/api/article/controllers/article.js
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::article.article', ({ strapi }) => ({
async find(ctx) {
// call default then modify response
const res = await super.find(ctx);
// add extra field
res.meta.custom = { processedAt: new Date().toISOString() };
return res;
},
}));
Lifecycle hook example:
// src/api/article/content-types/article/lifecycles.js
module.exports = {
async beforeCreate(event) {
const { data } = event.params;
if (data.title) data.slug = slugify(data.title);
},
};
src/api/<type>/content-types/schema.json → commit schema.src/api/<type>/controllers/ and src/api/<type>/services/ with thin controller calling service functions.content-types/<type>/lifecycles.js for side effects.yarn develop) → check admin UI for new content type.
GET /api/<type>?pagination[page]=1 that fields exist.yarn build to surface schema errors, verify schema.json validity.fetch('/api/<type>?populate=*') in test suite to validate relations populate.For more reference patterns and larger examples, see REFERENCE.md.
development
Defines 10 sequential validation gates: secret scanning, lint/test/build checks, blast radius analysis, dependency auditing, browser testing, cache management, regression checks, smoke tests. Use when running pre-deploy validation or CI checks, CI/CD pipelines, deployment pipeline validation, pre-merge checks, continuous integration, or pull request validation.
development
Generates test plans, writes unit/integration/E2E test files, identifies coverage gaps, flags common testing anti-patterns. Use when writing tests, creating test suites, planning test strategies, mocking dependencies, measuring code coverage, or test planning.
development
Provides model routing rules, validates delegation prerequisites, supplies cost tracking templates, defines dead-letter queue formats for Team Lead orchestration. Load when assigning tasks to agents, choosing model tiers, starting delegation session, running multi-agent workflow, delegating work, choosing which model to use, or assigning tasks.
testing
Saves, restores session state including task progress, file changes, delegation history. Use when saving progress, resuming interrupted work, picking up where you left off, or checkpointing current work.