Skip to content

Samples & Templates

The samples/ directory ships ready-to-copy examples and templates. Each one focuses on a single capability — copy what you need.

TIP

First-time validation: run Workspace first, then pick Automations / Hooks / Skills as needed.

Configuration Templates

NamePurposeRepository
AutomationsLocal task templates and a minimal workspace config for Automationssamples/automations
HooksExample lifecycle hooks for Linux and Windowssamples/hooks
PluginsReference plugin packages for development and integration testingsamples/plugins

Workspace Behavior Examples

NamePurposeRepository
Automations · example-local-taskLocal task template (task.md + workflow.md)samples/automations
Hooks · windowsPowerShell hooks (block dangerous Exec, log file writes)samples/hooks/windows
Hooks · linuxBash hooks (block dangerous Exec, log file writes)samples/hooks/linux

Skills Templates

NamePurposeRepository
dev-guideProject development standards example with module referencessamples/skills/dev-guide
feature-workflowLarge feature workflow for breakdown, implementation, validationsamples/skills/feature-workflow
dotcraft-llm-error-diagnosisRead-only diagnosis flow for LLM / agent / tool / session failuressamples/skills/llm-error-diagnosis

Plugin Templates

samples/plugins/ collects reference DotCraft plugin scaffolds. When building your own plugin, scaffold via the built-in $plugin-creator first, then refine using these examples.

Common Workflows

Workspace

bash
cd /path/to/your-project
dotcraft setup --provider-mode create \
  --provider-protocol anthropic --provider-id anthropic \
  --model claude-sonnet-4-5 --api-key <anthropic-api-key> \
  --profile developer

This is the safest first-time path. After setup, .craft/ contains workspace config and bootstrap files. If you want a long-running server deployment for social-channel bots, use the Docker path in Server Deployment:

bash
cd deploy/docker
cp .env.example .env
docker compose up -d

The template's most-edited fields:

FieldRecommendation
DashBoard.Host / DashBoard.PortAdjust to local bind address or port
Tools.Sandbox.EnabledOnly enable when actually running OpenSandbox
Tools.Sandbox.DomainPoint to your OpenSandbox; do not collide with the Dashboard port
Tools.Sandbox.ImageReplace with your sandbox container image

Hooks

Copy the platform directory under samples/hooks/<platform>/ to your workspace:

text
<workspace>/.craft/hooks.json
<workspace>/.craft/hooks/...

On Linux / macOS, make scripts executable:

bash
chmod +x hooks/*.sh

WARNING

Creating or editing Hooks requires restarting DotCraft to take effect. Startup-level fields don't hot-reload — restart the relevant host after copying any sample config. See Settings Lifecycle for which fields apply immediately.

If you do not want to write hook config by hand, describe the need in chat and let the built-in create-hooks skill scaffold it.

Skills

text
.craft/skills/dev-guide/
.craft/skills/feature-workflow/

Keep the structure after copying and gradually replace placeholders with project-specific terminology, paths, and acceptance criteria.

Apache License 2.0