Use when: scaffolding a new backend entity type, domain module, GraphQL schema, resolvers, or STIX converter in opencti-graphql
68
85%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
MalwareAnalysis).ENTITY_TYPE_MALWARE_ANALYSIS).ABSTRACT_STIX_DOMAIN_OBJECT.Create opencti-platform/opencti-graphql/src/modules/<entityName>.
<name>.graphql)Define the Input, Type, Queries, and Mutations.
<name>-types.ts)Define TypeScript interfaces for StixObject, StoreEntity, and internal representations.
Export the ENTITY_TYPE_X constant here.
<name>-converter.ts)Implement convert<Name>ToStix function to map StoreEntity to StixObject.
<name>-domain.ts)Implement CRUD functions: findAll, findById, add<Name>, delete<Name>.
Use listEntities and createEntity from database/middleware.
<name>-resolvers.ts)Map the GraphQL Query/Mutation fields to the functions in <name>-domain.ts.
<name>.ts)Implement ModuleDefinition interface.
Define attributes, relations, and register the definition using registerDefinition.
If the module is behind a feature flag, set featureFlag: <FLAG_CONSTANT> on each
attribute and nested mapping — see the add-feature-flag skill.
<name>-graphql.ts)Create a <name>-graphql.ts file in the module folder that imports the module schema/resolvers and calls registerGraphqlSchema(...).
src/modules/index.tsAdd two distinct imports in src/modules/index.ts:
region registration modules section, import ./<entityName>/<entityName> (module definition registration).region graphql registration section, import ./<entityName>/<entityName>-graphql (GraphQL endpoint registration).If the entity belongs to a STIX union type (e.g., StixObject, StixDomainObject), add it to the relevant unions in src/schema/opencti.graphql.
Run yarn build:schema to regenerate TypeScript types from the updated schema.
OpenCTI-Platform/opencti
2cc5089
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.