drupal-org-contribution-prep

drupal-org-contribution-prep is a skill for Claude Code from trebormc/drupal-ai-agents. It costs 179 tokens per session (1,300 once invoked), scanned A, original, Apache-2.0.

A preparation process for contributing a custom Drupal module to drupal.org, the community site where Drupal code is shared and maintained.

In plain words
What is it for?
Use it before publishing or contributing a module to set up GitLab CI, register unit, kernel, and functional tests, check repository hygiene, run the test suites, and prepare hand-off documentation.
Why use it?
It catches missing test-suite registrations, broken fixture paths, and repository problems that can hide failures or make the module difficult for future maintainers to use.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it before publishing or contributing a module to set up GitLab CI, register unit, kernel, and functional tests, check repository hygiene, run the test suites, and prepare hand-off documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trebormc/drupal-ai-agents/drupal-org-contribution-prep
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add trebormc/drupal-ai-agents --skill drupal-org-contribution-prep
Clone the repo
git clone --depth 1 https://github.com/trebormc/drupal-ai-agents

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for drupal-org-contribution-prep

README.md
[![agentmods](https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/drupal-org-contribution-prep/github.svg)](https://agentmods.dev/skills/trebormc/drupal-ai-agents/drupal-org-contribution-prep)
Your own site
<a href="https://agentmods.dev/skills/trebormc/drupal-ai-agents/drupal-org-contribution-prep"><img src="https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/drupal-org-contribution-prep/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for drupal-org-contribution-prep

Your own site · 80×15
<a href="https://agentmods.dev/skills/trebormc/drupal-ai-agents/drupal-org-contribution-prep"><img src="https://agentmods.dev/badge/skills/trebormc/drupal-ai-agents/drupal-org-contribution-prep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 179 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,300 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00179 $0.01300
Opus 5.5 $0.00072 $0.00520
Sonnet 5.5 $0.00036 $0.00260
Haiku 4.5 $0.00018 $0.00130

Measured 1mo ago against content hash e616a1a03c39, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

drupal-org-contribution-prep scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/drupal-org-contribution-prep/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Drupal.org Contribution Prep

A module can be functionally perfect and still present badly. Fix presentation before contributing. All test commands via ssh web.

1. Test-suite registration (the silent-failure trap)

phpunit.xml.dist MUST declare unit, kernel AND functional suites. A project declaring only unit accumulates kernel failures nobody sees (in the field: 10 kernel failures + a missing fixtures directory went unnoticed for months).

<testsuites>
  <testsuite name="unit">
    <directory>web/modules/custom/*/tests/src/Unit</directory>
  </testsuite>
  <testsuite name="kernel">
    <directory>web/modules/custom/*/tests/src/Kernel</directory>
  </testsuite>
  <testsuite name="functional">
    <directory>web/modules/custom/*/tests/src/Functional</directory>
  </testsuite>
</testsuites>

(Adapt web/ to the real $DDEV_DOCROOT.) Then actually RUN all three suites — do not stop at registering them. Also verify every fixture path referenced in any setUp() exists in the repo:

grep -rn "fixtures" $DDEV_DOCROOT/modules/custom/<module>/tests --include=*.php | grep -oE "[A-Za-z0-9_./-]*fixtures[A-Za-z0-9_./-]*" | sort -u
# ls each resulting path — a missing directory means tests silently test nothing.

2. GitLab CI

.gitlab-ci.yml including the official gitlab_templates ($_GITLAB_TEMPLATES_REPO) with opt-ins matching the declared core range:

include:
  - project: $_GITLAB_TEMPLATES_REPO
    ref: $_GITLAB_TEMPLATES_REF
    file: .gitlab-ci.yml
variables:
  OPT_IN_TEST_PREVIOUS_MAJOR: 1
  OPT_IN_TEST_NEXT_MINOR: 1
  OPT_IN_TEST_NEXT_MAJOR: 1

A green pipeline is the first thing reviewers look at. Layout gotcha: the module's own phpstan.neon on drupal.org CI resolves includes against an ADJACENT vendor/; installed under modules/contrib those includes fail. Document a local-equivalent config rather than "fixing" the neon — it is correct for its target environment.

3. Repository hygiene

  • Remove orphaned dirs (empty submodule stubs, stale fixture duplicates). Upgrade Status parses ALL Twig files, so a broken leftover fixture becomes a public finding in bot issues.
  • Check the git INDEX, not just the worktree — staged-then-deleted ghost files ride along silently:

Read the full file on GitHub · 126 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 126 lines · 179 tokens per session scan A e616a1a03c39

Subscribe to this mod's changes

drupal-org-contribution-prep is a skill published in the GitHub repository trebormc/drupal-ai-agents (11 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 179 tokens to every session and 1,300 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.