Create Drone CI
Create a repository-local Drone CI setup with infrastructure and task assets
organized under .ci/, while keeping Drone's canonical pipeline entry point at
the repository root as .drone.yml.
Workflow
Identify the target repository, Git provider, public Drone URL, runner host, and whether the user wants scaffolding only or also wants services started.
Read
STATE.md; for a new run, reset it fromreferences/template/STATE.template.md.Read the relevant references and mark the current step
in_progressinSTATE.mdbefore changing the target repository.Inspect the target repository's instructions, existing CI, language, tests, dirty status, remotes, and Docker/Compose conventions.
Create the repository only when requested. Never invent a remote URL, organization, credentials, ports, storage paths, or public callback URL.
Scaffold the baseline with:
python3 references/scripts/scaffold_drone_ci.py --repo <repo-path>Add
--init-gitonly when the target is not already a Git repository. Add--with-dockerfilesonly when custom Drone images are actually required.Replace the starter smoke command with the repository's real test command, then keep task scripts under
.ci/scripts/and their tests under.ci/tests/.Populate
.ci/drone/.envlocally from.env.example. GenerateDRONE_RPC_SECRETsecurely and create the Git provider OAuth application; never commit secrets.Validate static configuration before starting services. If the user asked to start them, run the checked-in Compose stack, inspect server and runner logs, authenticate to Drone, and activate the repository so Drone creates the provider webhook.
Update
STATE.mdwith concrete evidence and report changed paths, validation, runtime status, and any manual OAuth or repository activation step that remains.
References
- Read
references/drone-conventions.mdbefore choosing provider settings, server/runner topology, image policy, pipeline triggers, or Dockerfiles. - Read
references/rules/filetree.mdbefore adding, moving, or removing skill or target-repository files. - Read
references/rules/env.mdbefore creating.env, installing tools, or starting Drone services. - Read
references/validation.mdbefore validating or starting the stack. - Read
references/rules/state-rules.mdbefore updatingSTATE.md.
Rules
- Use
.drone.yml, not.drone.ci, unless the installed Drone server is explicitly configured with a non-default repository config path. - Keep Server/Runner infrastructure in
.ci/drone/, task documentation in.ci/docs/, task scripts in.ci/scripts/, and script tests in.ci/tests/. - Use the official
drone/drone:2anddrone/drone-runner-docker:1images directly by default. A normal installation needsdocker pullordocker compose pull, not a custom Drone image build. - Create Dockerfiles only for a concrete extension such as an internal CA, approved plugin, or required diagnostic tool. Preserve the official Drone entrypoint and pin the resulting base image for production.
- Treat a Docker runner with
/var/run/docker.sockas host-level trusted infrastructure. Do not enable untrusted repositories or privileged pipeline execution without explicit authorization. - Do not start Docker, create OAuth applications, activate repositories, create webhooks, commit, or push unless the user's request authorizes that action.
Output
Report:
- Repository and files created or changed.
- Pipeline steps and trigger conditions.
- Static validation and, when requested, Server/Runner runtime status.
- Git provider OAuth/webhook activation status.
- Remaining placeholders, secrets, or manual steps.