devcontainer-feature-creator
Installation
SKILL.md
Dev Container Feature Creator
This skill acts as an implementation manual to assist you in scaffolding, developing, updating, and extensively testing Dev Container Features. It leverages the official Dev Container Features specification, testing framework, and authoring best practices.
Core Principles
- Mandatory Planning: Before scaffolding or modifying a feature, you MUST draft a design plan and obtain user approval. The plan should outline the feature ID, options, installation strategy, and testing scenarios.
- Idempotency: Installation scripts MUST be idempotent. They should be safe to run multiple times with different options without failing or causing unintended side effects.
- OS Compatibility: Installation scripts should verify the OS/distro at the beginning and support a diverse set of base images, defaulting to
shor safely bootstrappingbash. - Handling Non-Root Users: Scripts run as
root, but the final user might not be root. Use_REMOTE_USERto set permissions appropriately. - Comprehensive Testing: Always implement auto-generated tests, scenario tests, and duplicate tests using the
devcontainer features testcommand framework.
Workflow
Follow these steps to construct or update a Dev Container Feature:
1. Analyze & Scaffold
- Check the workspace structure. Features usually live in
src/<feature-name>/and their tests intest/<feature-name>/. - Create these directories if they don't exist.