with one click
scaffold-report-repo
// Trigger when the user wants to create a new GitLab repo for automated, scheduled engineering reports — setting up CI pipelines, DSPy prompts, and GitLab Pages publishing from DevLake data.
// Trigger when the user wants to create a new GitLab repo for automated, scheduled engineering reports — setting up CI pipelines, DSPy prompts, and GitLab Pages publishing from DevLake data.
This skill should be used whenever the user asks about engineering metrics, software delivery performance, or team productivity data — including PR statistics, DORA metrics (deployment frequency, lead time, change failure rate, recovery time), code coverage, CI/CD health, build success rates, flaky or failing tests, retest patterns, PR cycle time (coding time, pickup time, review time), merge throughput, incidents, or Jira feature tracking. Use this skill even when the user doesn't mention "DevLake" explicitly — any question about "how many PRs", "what's our deploy rate", "which tests are flaky", "compare team metrics", "coverage trends", "build failures", or "change failure rate" should trigger this skill. Also trigger for cross-team comparisons, historical trend analysis, bottleneck identification, and any request to query or analyze engineering data from repositories.
Trigger when the user wants a formatted HTML report file — DORA metrics report, PR cycle time report, engineering excellence report, coverage report, or retest analysis report. Not for quick questions (use devlake skill instead).
| name | scaffold-report-repo |
| description | Trigger when the user wants to create a new GitLab repo for automated, scheduled engineering reports — setting up CI pipelines, DSPy prompts, and GitLab Pages publishing from DevLake data. |
| disable-model-invocation | true |
Generate a complete GitLab repository structure with CI pipelines for automated, scheduled DevLake report generation and GitLab Pages publishing.
This skill follows the Pipeline + Inversion pattern: gather all requirements through structured questions before generating any files.
Read these as needed:
references/category-definitions.md — Report category metadata: keys, prompt dirs, task files, SCHEDULER_TYPE aliases, scope preferences. Read this before Step 3.templates/ — Jinja2 templates for all generated files. The skill renders these with user-provided variables.../../skills/devlake/references/devlake-schema.md — Actual prod schema (for verifying SQL patterns in prompts)IMPORTANT: DO NOT generate any files until ALL steps (1-7) are complete and the user has confirmed the summary in Step 7. Each step must be answered before proceeding to the next.
Query the user's configured DevLake MCP server to discover available organizations.
Querying DevLake MCP for available projects...
Available organizations:
1. Org A
2. Org B
3. Org C
Select organization: [user picks or provides in prompt]
If the user already specified the org in their prompt, skip discovery.
Gate: Do not proceed until organization is confirmed.
Query for sub-groups/teams under the selected organization.
Sub-groups under "Org A":
1. Team Alpha (12 repos)
2. Team Beta (8 repos)
3. Team Gamma (15 repos)
Select sub-groups for per-team reports (comma-separated, or "all"):
Gate: Do not proceed until sub-groups are confirmed.
Read references/category-definitions.md for the full category list.
Available report categories:
1. DORA Metrics - Deployment frequency, lead time, change fail rate, recovery time
2. PR Cycle Time - Code change cycle time breakdown (coding, pickup, review)
3. Engineering Excellence - CI bottlenecks, PR analysis, flaky tests, GH Actions health
4. Code Coverage - Test coverage metrics across repositories with trends
5. Retest Analysis - PR retest patterns, common failure identification
Select categories (comma-separated, or "all" for default): [all]
Gate: Do not proceed until categories are confirmed.
a. Pipeline structure:
1. Org-level only - Single report for the entire organization
2. Sub-group level (default) - Per-team reports + org-level summary
3. Both - Org-level + per-team reports
Select: [2]
b. GitLab runner tag (REQUIRED - wrong tag causes jobs to hang):
Tag: [user provides, e.g., "shared", "docker", "kubernetes"]
c. AI provider:
1. claude (default)
2. gemini
3. openai
Select: [1]
cicaddy-gitlab CI template include method:
a. remote (default) - include from GitHub raw URL
b. project - include from internal GitLab project (provide path)
Select method: [a]
If user selects b, ask for the GitLab project path (e.g., my-group/cicaddy-gitlab-mirror).
Does your GitLab instance or DevLake MCP endpoint use certificates
signed by an internal/custom CA? (e.g., corporate CA, self-signed)
a. No (default) - standard public CA certificates are sufficient
b. Yes - provide the CA certificate bundle download URL
If yes, provide:
CA certificate bundle URL: [e.g., https://certs.example.com/ca-bundle.pem]
If the user provides a CA cert URL, the scaffold generates:
.gitlab/templates/base/ssl_setup.yml with the cert download and trust store configuration.ssl_setup in their before_scriptVARIABLES.md documents the CUSTOM_CA_CERT_URL variable as an override optionPresent a summary of all choices and ask for confirmation before generating.
Summary:
Organization: Org A
Sub-groups: Team Alpha, Team Beta, Team Gamma
Categories: DORA, PR Cycle Time, Engineering Excellence, Coverage, Retest
Pipeline structure: Sub-group level
Runner tag: shared
AI provider: claude
CI template: remote (GitHub)
SSL cert: No
Output directory: ./my-org-reports/
Confirm and generate? [yes/no]
Gate: DO NOT generate files until the user confirms.
Then render templates from templates/ and write the repo structure to the user's specified directory.
<repo-name>/
├── .gitlab-ci.yml # Main entry: stages, workflow rules, includes
├── .gitlab/
│ ├── templates/
│ │ ├── base/
│ │ │ └── ssl_setup.yml # (optional) Custom CA cert setup
│ │ └── mcp/
│ │ └── devlake.yml # MCP server config (user's endpoint + auth)
│ ├── workflows/
│ │ ├── scheduled-analysis.yml # Trigger jobs with SCHEDULER_TYPE routing
│ │ └── pages-deployment.yml # GitLab Pages artifact collection
│ ├── child-pipelines/
│ │ ├── dora.yml # DORA: org-level job
│ │ ├── pr-cycle-time.yml # PR Cycle Time: org-level + per-subgroup jobs
│ │ ├── engineering-excellence.yml # Eng Excellence: per-subgroup jobs
│ │ ├── coverage.yml # Coverage: org-level + per-subgroup jobs
│ │ └── retest.yml # Retest: per-repo jobs + summary
│ ├── prompts/ # DSPy task files per category
│ │ └── ...
│ └── report-template.html # Shared HTML/CSS report template
├── VARIABLES.md # CI/CD variable setup instructions
└── README.md # Setup, usage, report categories
include: remote: may be blocked — some GitLab instances block external URLs in CI includes. If the user reports this, suggest switching to project: method with a synced mirror repo.expire_in: 30 days. Warn users that older reports will be deleted unless they adjust this or copy to GitLab Pages.SCHEDULER_TYPE value. Users often miss this and wonder why all reports run on every schedule.AI_TASK_FILE paths use ../ prefix because child pipelines run in a subdirectory. If users restructure the generated repo, these paths will break.skills/VERSION for the validated MCP version.{{DEVLAKE_PROJECT_NAME}}, {{DEVLAKE_MCP_ENDPOINT}})