egg-core
Skill by eggjs
egg-core is an agent skill that explains the core concepts of the EGG framework. It covers modules, dependency injection with SingletonProto, ContextProto and Inject, background tasks, EventBus and AOP. It is for developers building EGG applications.
Install egg-core
Built from the published package, never by AI.
git clone --depth 1 https://github.com/eggjs/egg /tmp/egg && mkdir -p ~/.claude/skills && cp -r /tmp/egg/packages/skills/egg-core ~/.claude/skills/egg-coreRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/eggjs/egg /tmp/egg && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/egg/packages/skills/egg-core ~/.gemini/antigravity-cli/skills/egg-coreAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
egg-core is a skill that helps an AI assistant work with the core concepts of the EGG framework. It explains how code is organised into modules, how services are declared with SingletonProto and ContextProto, and how Inject is used for dependency injection. It also covers dynamic injection to choose between several implementations at runtime, background tasks that run after a response is returned, the EventBus, and AOP with Pointcut and Crosscut.
The skill is a SKILL.md file that points to reference documents for modules, Inject, proto objects, dynamic injection, background tasks, EventBus and AOP. It includes a decision guide for choosing a service scope or async method and a troubleshooting table for common errors. The source says it is meant for understanding EGG building blocks, dependency injection, object lifecycles and asynchronous handling.
Written from the project's SKILL.md and checked against it.
What it can do
- Module organisationExplains how to declare a module with eggModule.name in a package.json file.
- Proto servicesCovers SingletonProto and ContextProto for choosing service lifetimes.
- Dependency injectionShows how to use Inject to inject other proto objects and Egg objects.
- Dynamic injectionDescribes selecting one of several implementations at runtime through EggObjectFactory.
- BackgroundTaskHelperCovers running tasks after a response is returned while sharing request context.
- EventBusDescribes decoupled event handlers that run in a new context.
- AOPCovers Pointcut and Crosscut for separating cross-cutting concerns from business code.
- TroubleshootingLists common errors such as EggPrototypeNotFound with their causes and fixes.
Try asking
- Explain when to use SingletonProto versus ContextProto in my EGG app.
- Show me how to share a service across modules with AccessLevel.PUBLIC.
- Which EGG approach should I use to run a task after the response is sent?
Good to know
- Module names cannot contain - or other special characters.
- Proto and module dependencies cannot be circular.
- Application and context objects should not be injected directly.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: packages/skills/egg-core/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Read
-
SKILL.md9 KB -
references/aop.md7 KB -
references/background-task.md4 KB -
references/dynamic-inject.md2 KB -
references/eventbus.md5 KB
Show all 8 files
-
references/inject.md6 KB -
references/module.md4 KB -
references/proto.md5 KB
Alternatives to egg-core
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
egg-core: common questions
What is the difference between BackgroundTaskHelper and EventBus in EGG?
BackgroundTaskHelper keeps the logic in the trigger's code and shares the request context. EventBus handlers are independent and run in a new context, so new handlers do not require changes to the trigger.
Which package should EGG decorators be imported from?
The source says decorators and types should be imported from 'egg', not '@eggjs/tegg'. AOP decorators are imported from 'egg/aop'.
Does egg-core cover testing?
Testing is handled by the separate egg-unittest skill, which covers Service, BackgroundTask and EventBus tests.
How do I install egg-core?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is egg-core free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is egg-core safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to egg-core?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
