Official agent skill

Distill

by DataDog in DataDog/datadog-agent

Extract an Allium specification from an existing codebase. An agent skill from DataDog/datadog-agent.

OfficialApache-2.0Auto-check passedDevOps & Cloud

Install Distill

skills CLI
$ npx skills add DataDog/datadog-agent --skill distill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DataDog/datadog-agent distill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DataDog/datadog-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/allium/skills/distill .claude/skills/distill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
distill
GitHub stars
3.8k
Used in
1 other repo
Token cost
~7k tokens
SKILL.md length
2,234 words
Files
2 (incl. references)
Skills in repo
35
Repo updated
First seen
Licence
Apache-2.0

At a glance

Extract an Allium specification from an existing codebase. An agent skill from DataDog/datadog-agent.

  • Works in 7 steps: Map the territory → Extract entity states → Extract transitions → …
  • The user has existing code and wants to distil behaviour into a spec
  • SKILL.md covers Scoping the distillation effort, Finding the right level of…, The distillation mindset and The concrete detail problem, plus 2 more sections
  • Reaches slack.com

What it does

Distill is an agent skill from DataDog/datadog-agent, published by the product's own GitHub organization. Extract an Allium specification from an existing codebase. Use when the user has existing code and wants to distil behaviour into a spec, reverse engineer a specification from implementation, generate a spec from code, turn implementation into a behavioural specification, or document what a codebase does in Allium terms.

Its SKILL.md is about 7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/worked-examples.md`).

It sits in DevOps & Cloud. The repository describes itself as: Main repository for Datadog Agent. The licence is Apache-2.0.

When your agent uses it

  • The user has existing code and wants to distil behaviour into a spec
  • Reverse engineer a specification from implementation
  • Generate a spec from code
  • Turn implementation into a behavioural specification

Example prompts

  • “/distill”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Map the territory
  2. Extract entity states
  3. Extract transitions
  4. Find temporal triggers
  5. Identify external boundaries
  6. Abstract away implementation
  7. Validate with stakeholders

What it can do on your machine

Read from SKILL.md and the folder at commit 20eff25. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and java).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • slack.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Distill loads about 7k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 83 tokens; SKILL.md has 2,234 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~83
When it runs · the whole SKILL.md, loaded when a task matches
~7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DataDog/datadog-agent at commit 20eff25, republished under its Apache-2.0 licence (© DataDog). 2,234 words, ~7,029 tokens.

Download SKILL.mdSave it as .claude/skills/distill/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
distill
description
Extract an Allium specification from an existing codebase. Use when the user has existing code and wants to distil behaviour into a spec, reverse engineer a specification from implementation, generate a spec from code, turn implementation into a behavioural specification, or document what a codebase does in Allium terms.
model
sonnet

Distillation guide

This guide covers extracting Allium specifications from existing codebases. The core challenge is the same as forward elicitation: finding the right level of abstraction. In elicitation you filter out implementation ideas as they arise. In distillation you filter out implementation details that already exist. Both require the same judgement about what matters at the domain level.

Code tells you how something works. A specification captures what it does and why it matters. The skill is asking "why does the stakeholder care about this?" and "could this be different while still being the same system?"

Scoping the distillation effort

Before diving into code, establish what you are trying to specify. Not every line of code deserves a place in the spec.

Questions to ask first
  1. "What subset of this codebase are we specifying?" Mono repos often contain multiple distinct systems. You may only need a spec for one service or domain. Clarify boundaries explicitly before starting.

  2. "Is there code we should deliberately exclude?"

    • Legacy code: features kept for backwards compatibility but not part of the core system
    • Incidental code: supporting infrastructure that is not domain-level (logging, metrics, deployment)
    • Deprecated paths: code scheduled for removal
    • Experimental features: behind feature flags, not yet design decisions
  3. "Who owns this spec?" Different teams may own different parts of a mono repo. Each team's spec should focus on their domain.

The "Would we rebuild this?" test

For any code path you encounter, ask: "If we rebuilt this system from scratch, would this be in the requirements?"

  • Yes: include in spec
  • No, it is legacy: exclude
  • No, it is infrastructure: exclude
  • No, it is a workaround: exclude (but note the underlying need it addresses)
Documenting scope decisions

At the top of a distilled spec, document what is included and excluded:

-- allium: 3
-- interview-scheduling.allium

-- Scope: Interview scheduling flow only
-- Includes: Candidacy, Interview, InterviewSlot, Invitation, Feedback
-- Excludes:
--   - User authentication (use auth library spec)
--   - Analytics/reporting (separate spec)
--   - Legacy V1 API (deprecated, not specified)
--   - Greenhouse sync (use greenhouse library spec)

The version marker (-- allium: N) must be the first line of every .allium file. Use the current language version number.

Finding the right level of abstraction

Distillation and elicitation share the same fundamental challenge: choosing what to include. The tests below work in both directions, whether you are hearing a stakeholder describe a feature or reading code that implements it.

The "Why" test

For every detail in the code, ask: "Why does the stakeholder care about this?"

Code detailWhy?Include?
Invitation expires in 7 daysAffects candidate experienceYes
Token is 32 bytes URL-safeSecurity implementationNo
Sessions stored in RedisPerformance choiceNo
Uses PostgreSQL JSONBDatabase implementationNo
Slot status changes to 'proposed'Affects what candidate seesYes
Email sent when invitation acceptedCommunication requirementYes

If you cannot articulate why a stakeholder would care, it is probably implementation.

The "Could it be different?" test

Ask: "Could this be implemented differently while still being the same system?"

  • If yes: probably implementation detail, abstract it away
  • If no: probably domain-level, include it
DetailCould be different?Include?
secrets.token_urlsafe(32)Yes, any secure token generationNo
7-day invitation expiryNo, this is the design decisionYes
PostgreSQL databaseYes, any databaseNo
"Pending, Confirmed, Completed" statesNo, this is the workflowYes
The "Template vs Instance" test

Is this a category of thing, or a specific instance?

Instance (often implementation)Template (often domain-level)
Google OAuthAuthentication provider
Slack webhookNotification channel
SendGrid APIEmail delivery
timedelta(hours=3)Confirmation deadline

Sometimes the instance IS the domain concern. See "The concrete detail problem" below.

The distillation mindset

Code is over-specified

Every line of code makes decisions that might not matter at the domain level:

python
# Code tells you:
def send_invitation(candidate_id: int, slot_ids: List[int]) -> Invitation:
    candidate = db.session.query(Candidate).get(candidate_id)
    slots = db.session.query(InterviewSlot).filter(
        InterviewSlot.id.in_(slot_ids),
        InterviewSlot.status == 'confirmed'
    ).all()

    invitation = Invitation(
        candidate_id=candidate_id,
        token=secrets.token_urlsafe(32),
        expires_at=datetime.utcnow() + timedelta(days=7),
        status='pending'
    )
    db.session.add(invitation)

    for slot in slots:
        slot.status = 'proposed'
        invitation.slots.append(slot)

    db.session.commit()

    send_email(
        to=candidate.email,
        template='interview_invitation',
        context={'invitation': invitation, 'slots': slots}
    )

    return invitation
-- Specification should say:
rule SendInvitation {
    when: SendInvitation(candidacy, slots)

    requires: slots.all(s => s.status = confirmed)

    ensures:
        for s in slots:
            s.status = proposed
    ensures: Invitation.created(
        candidacy: candidacy,
        slots: slots,
        expires_at: now + 7.days,
        status: pending
    )
    ensures: Email.created(
        to: candidacy.candidate.email,
        template: interview_invitation
    )
}

What we dropped:

  • candidate_id: int became just candidacy
  • db.session.query(...) became relationship traversal
  • secrets.token_urlsafe(32) removed entirely (token is implementation)
  • datetime.utcnow() + timedelta(...) became now + 7.days
  • db.session.add/commit implied by created
  • invitation.slots.append(slot) implied by relationship
Ask "Would a product owner care?"

For every detail in the code, ask:

Code detailProduct owner cares?Include?
Invitation expires in 7 daysYes, affects candidate experienceYes
Token is 32 bytes URL-safeNo, security implementationNo
Uses SQLAlchemy ORMNo, persistence mechanismNo
Email template nameMaybe, if templates are design decisionsMaybe
Slot status changes to 'proposed'Yes, affects what candidate seesYes
Database transaction commitsNo, implementation detailNo
Distinguish means from ends

Means: how the code achieves something. Ends: what outcome the system needs.

Means (code)Ends (spec)
requests.post('https://slack.com/api/...')Notification.created(channel: slack)
candidate.oauth_token = google.exchange(code)Candidate authenticated
redis.setex(f'session:{id}', 86400, data)Session.created(expires: 24.hours)
for slot in slots: slot.status = 'cancelled'for s in slots: s.status = cancelled

The concrete detail problem

The hardest judgement call: when is a concrete detail part of the domain vs just implementation?

Google OAuth example

You find this code:

python
OAUTH_PROVIDERS = {
    'google': GoogleOAuthProvider(client_id=..., client_secret=...),
}

def authenticate(provider: str, code: str) -> User:
    return OAUTH_PROVIDERS[provider].authenticate(code)

Question: Is "Google OAuth" domain-level or implementation?

It is implementation if:

  • Google is just the auth mechanism chosen
  • It could be replaced with any OAuth provider
  • Users do not see or care which provider
  • The code is written generically (provider is a parameter)

It is domain-level if:

  • Users explicitly choose Google (vs Microsoft, etc.)
  • "Sign in with Google" is a feature
  • Google-specific scopes or permissions are used
  • Multiple providers are supported as a feature

How to tell: Look at the UI and user flows. If users see "Sign in with Google" as a choice, it is domain-level. If they just see "Sign in" and Google happens to be behind it, it is implementation.

Database choice example

You find PostgreSQL-specific code:

python
from sqlalchemy.dialects.postgresql import JSONB, ARRAY

class Candidate(Base):
    skills = Column(ARRAY(String))
    metadata = Column(JSONB)

Almost always implementation. The spec should say:

entity Candidate {
    skills: Set<String>
    metadata: String?              -- or model specific fields
}

The specific database is rarely domain-level. Exception: if the system explicitly promises PostgreSQL compatibility or specific PostgreSQL features to users.

Third-party integration example

You find Greenhouse ATS integration:

python
class GreenhouseSync:
    def import_candidate(self, greenhouse_id: str) -> Candidate:
        data = self.client.get_candidate(greenhouse_id)
        return Candidate(
            name=data['name'],
            email=data['email'],
            greenhouse_id=greenhouse_id,
            source='greenhouse'
        )

Could be either:

Implementation if:

  • Greenhouse is just where candidates happen to come from
  • Could be swapped for Lever, Workable, etc.
  • The integration is an implementation detail of "candidates are imported"

Spec:

external entity Candidate {
    name: String
    email: String
    source: CandidateSource
}

Product-level if:

  • "Greenhouse integration" is a selling point
  • Users configure their Greenhouse connection
  • Greenhouse-specific features are exposed (like syncing feedback back)

Spec:

external entity Candidate {
    name: String
    email: String
    greenhouse_id: String?  -- explicitly modeled
}

rule SyncFromGreenhouse {
    when: GreenhouseWebhookReceived(candidate_data)
    ensures: Candidate.created(
        ...
        greenhouse_id: candidate_data.id
    )
}
The "Multiple implementations" heuristic

Look for variation in the codebase:

  • If there is only one OAuth provider, probably implementation
  • If there are multiple OAuth providers, probably domain-level
  • If there is only one notification channel, probably implementation
  • If there are Slack AND email AND SMS, probably domain-level

The presence of multiple implementations suggests the variation itself is a domain concern.

Distillation process

Step 1: Map the territory

Before extracting any specification, understand the codebase structure:

  1. Identify entry points. API routes, CLI commands, message handlers, scheduled jobs.
  2. Find the domain models. Usually in models/, entities/, domain/.
  3. Locate business logic. Services, use cases, handlers.
  4. Note external integrations. What third parties does it talk to?

Create a rough map:

Entry points:
  - API: /api/candidates/*, /api/interviews/*, /api/invitations/*
  - Webhooks: /webhooks/greenhouse, /webhooks/calendar
  - Jobs: send_reminders, expire_invitations, sync_calendars

Models:
  - Candidate, Interview, InterviewSlot, Invitation, Feedback

Services:
  - SchedulingService, NotificationService, CalendarService

Integrations:
  - Google Calendar, Slack, Greenhouse, SendGrid
Step 2: Extract entity states

Look at enum fields and status columns:

python
class Invitation(Base):
    status = Column(Enum('pending', 'accepted', 'declined', 'expired'))

Becomes:

entity Invitation {
    status: pending | accepted | declined | expired
}

Look for enum definitions, status or state columns, constants like STATUS_PENDING = 'pending', and state machine libraries (e.g. transitions, django-fsm).

Step 3: Extract transitions

Find where status changes happen:

python
def accept_invitation(invitation_id: int, slot_id: int):
    invitation = get_invitation(invitation_id)

    if invitation.status != 'pending':
        raise InvalidStateError()
    if invitation.expires_at < datetime.utcnow():
        raise ExpiredError()

    slot = get_slot(slot_id)
    if slot not in invitation.slots:
        raise InvalidSlotError()

    invitation.status = 'accepted'
    slot.status = 'booked'

    # Release other slots
    for other_slot in invitation.slots:
        if other_slot.id != slot_id:
            other_slot.status = 'available'

    # Create the interview
    interview = Interview(
        candidate_id=invitation.candidate_id,
        slot_id=slot_id,
        status='scheduled'
    )

    notify_interviewers(interview)
    send_confirmation_email(invitation.candidate, interview)

Extract:

rule CandidateAcceptsInvitation {
    when: CandidateAccepts(invitation, slot)

    requires: invitation.status = pending
    requires: invitation.expires_at > now
    requires: slot in invitation.slots

    ensures: invitation.status = accepted
    ensures: slot.status = booked
    ensures:
        for s in invitation.slots:
            if s != slot: s.status = available
    ensures: Interview.created(
        candidacy: invitation.candidacy,
        slot: slot,
        status: scheduled
    )
    ensures: Notification.created(to: slot.interviewers, ...)
    ensures: Email.created(to: invitation.candidate.email, ...)
}

Key extraction patterns:

Code patternSpec pattern
if x.status != 'pending': raiserequires: x.status = pending
if x.expires_at < now: raiserequires: x.expires_at > now
if item not in collection: raiserequires: item in collection
x.status = 'accepted'ensures: x.status = accepted
Model.create(...)ensures: Model.created(...)
send_email(...)ensures: Email.created(...)
notify(...)ensures: Notification.created(...)

Assertions, checks and validations found in code (e.g. assert balance >= 0, class-level validators) may map to expression-bearing invariants rather than rule preconditions. Consider whether they describe a system-wide property or a rule-specific guard.

Step 4: Find temporal triggers

Look for scheduled jobs and time-based logic:

python
# In celery tasks or cron jobs
@app.task
def expire_invitations():
    expired = Invitation.query.filter(
        Invitation.status == 'pending',
        Invitation.expires_at < datetime.utcnow()
    ).all()

    for invitation in expired:
        invitation.status = 'expired'
        for slot in invitation.slots:
            slot.status = 'available'
        notify_candidate_expired(invitation)

@app.task
def send_reminders():
    upcoming = Interview.query.filter(
        Interview.status == 'scheduled',
        Interview.slot.time.between(
            datetime.utcnow() + timedelta(hours=1),
            datetime.utcnow() + timedelta(hours=2)
        )
    ).all()

    for interview in upcoming:
        send_reminder_notification(interview)

Extract:

rule InvitationExpires {
    when: invitation: Invitation.expires_at <= now
    requires: invitation.status = pending

    ensures: invitation.status = expired
    ensures:
        for s in invitation.slots:
            s.status = available
    ensures: CandidateInformed(candidate: invitation.candidate, about: invitation_expired)
}

rule InterviewReminder {
    when: interview: Interview.slot.time - 1.hour <= now
    requires: interview.status = scheduled

    ensures: Notification.created(to: interview.interviewers, template: reminder)
}
Step 5: Identify external boundaries

Look for third-party API calls, webhook handlers, import/export functions, and data that is read but never written (or vice versa).

These often indicate external entities:

python
# Candidate data comes from Greenhouse, we don't create it
def import_from_greenhouse(webhook_data):
    candidate = Candidate.query.filter_by(
        greenhouse_id=webhook_data['id']
    ).first()

    if not candidate:
        candidate = Candidate(greenhouse_id=webhook_data['id'])

    candidate.name = webhook_data['name']
    candidate.email = webhook_data['email']

Suggests:

external entity Candidate {
    name: String
    email: String
}

When repeated interface patterns appear across service boundaries (e.g. the same serialisation contract expected by multiple consumers), these suggest contract declarations for reuse rather than duplicated inline obligation blocks.

Step 6: Abstract away implementation

Now make a pass through your extracted spec and remove implementation details.

Before (too concrete):

entity Invitation {
    candidate_id: Integer
    token: String(32)
    created_at: DateTime
    expires_at: DateTime
    status: pending | accepted | declined | expired
}

After (domain-level):

entity Invitation {
    candidacy: Candidacy
    created_at: Timestamp
    expires_at: Timestamp
    status: pending | accepted | declined | expired

    is_expired: expires_at <= now
}

Changes:

  • candidate_id: Integer became candidacy: Candidacy (relationship, not FK)
  • token: String(32) removed (implementation)
  • DateTime became Timestamp (domain type)
  • Added derived is_expired for clarity

Config values that derive from other config values (e.g. extended_timeout = base_timeout * 2) should use qualified references or expression-form defaults in the config block rather than independent literal values.

Show full SKILL.md (886 more words)Show less
Step 7: Validate with stakeholders

The extracted spec is a hypothesis. Validate it:

  1. Show the spec to the original developers. "Is this what the system does?"
  2. Show to stakeholders. "Is this what the system should do?"
  3. Look for gaps. Code often has bugs or missing features; the spec might reveal them.

Common findings:

  • "Oh, that retry logic was a hack, we should remove it"
  • "Actually we wanted X but never built it"
  • "These two code paths should be the same but aren't"

Recognising library spec candidates

During distillation, stay alert for code that implements generic integration patterns rather than application-specific logic. These belong in library specs, not your main specification.

The same principle applies in elicitation. When a stakeholder describes "we use Google for login" or "payments go through Stripe", pause and consider whether this is a library spec.

Signals in the code

Third-party integration modules:

python
# Finding code like this suggests a library spec
class StripeWebhookHandler:
    def handle_invoice_paid(self, event):
        ...
    def handle_subscription_cancelled(self, event):
        ...

class GoogleOAuthProvider:
    def exchange_code(self, code):
        ...
    def refresh_token(self, refresh_token):
        ...

Generic patterns with specific providers:

  • OAuth flows (Google, Microsoft, GitHub)
  • Payment processing (Stripe, PayPal)
  • Email delivery (SendGrid, Postmark, SES)
  • Calendar sync (Google Calendar, Outlook)
  • ATS integrations (Greenhouse, Lever)
  • File storage (S3, GCS)

Configuration-driven integrations:

python
# Heavy configuration suggests the integration itself is separable
OAUTH_CONFIG = {
    'google': {'client_id': ..., 'scopes': ...},
    'microsoft': {'client_id': ..., 'scopes': ...},
}
Questions to ask
  1. "Is this integration logic, or application logic?" Integration: how to talk to Stripe. Application: what to do when payment succeeds.

  2. "Would another application integrate the same way?" If yes, library spec candidate. If no, probably application-specific.

  3. "Does the code separate integration from application concerns?" If cleanly separated, easy to extract to library spec. If tangled, might need refactoring first (but the spec should still separate them).

How to handle

Option 1: Reference an existing library spec

If a standard library spec exists for this integration:

use "github.com/allium-specs/stripe-billing/abc123" as stripe

-- Application responds to Stripe events
rule ActivateSubscription {
    when: stripe/PaymentSucceeded(invoice)
    ...
}

Option 2: Create a separate library spec

If no standard spec exists but the integration is generic:

-- greenhouse-ats.allium (library spec)
-- Specifies: Greenhouse webhook events, candidate sync, etc.

-- interview-scheduling.allium (application spec)
use "./greenhouse-ats.allium" as greenhouse

rule ImportCandidate {
    when: greenhouse/CandidateCreated(data)
    ensures: Candidacy.created(...)
}

Option 3: Abstract and move on

If the integration is minor, just abstract it:

-- Don't specify Slack details, just:
ensures: Notification.created(
    to: interviewers,
    channel: slack
)
Red flags: integration logic in your spec

If you find yourself writing spec like this, stop and reconsider:

-- TOO DETAILED - this is Stripe's domain, not yours
rule ProcessStripeWebhook {
    when: WebhookReceived(payload, signature)

    requires: verify_stripe_signature(payload, signature)

    let event = parse_stripe_event(payload)

    if event.type = "invoice.paid":
        ...
}

Instead:

-- Application responds to payment events (integration handled elsewhere)
rule PaymentReceived {
    when: stripe/InvoicePaid(invoice)
    ...
}
Common library spec extractions
Code pattern foundLibrary spec candidate
OAuth token exchange, refresh, session managementoauth2.allium
Stripe webhook handling, subscription lifecyclestripe-billing.allium
Email sending with templates, bounce handlingemail-delivery.allium
Calendar event sync, availability checkingcalendar-integration.allium
ATS candidate import, status syncgreenhouse-ats.allium, lever-ats.allium
File upload, virus scanning, thumbnail generationfile-storage.allium

See patterns.md Pattern 8 for detailed examples of integrating library specs.

Common distillation challenges

Challenge: Duplicate terminology

When you find two terms for the same concept (across specs, within a spec, or between spec and code) treat it as a blocking problem.

-- BAD: Acknowledges duplication without resolving it
-- Order vs Purchase
-- checkout.allium uses "Purchase" - these are equivalent concepts.

This is not a resolution. When different parts of a codebase are built against different specs, both terms end up in the implementation: duplicate models, redundant join tables, foreign keys pointing both ways.

What to do:

  • Choose one term. Cross-reference related specs before deciding.
  • Update all references. Do not leave the old term in comments or "see also" notes.
  • Note the rename in a changelog, not in the spec itself.

Warning signs in code:

  • Two models representing the same concept (Order and Purchase)
  • Join tables for both (order_items, purchase_items)
  • Comments like "equivalent to X" or "same as Y"

The spec you extract must pick one term. Flag the other as technical debt to remove.

Challenge: Implicit state machines

Code often has implicit states that are not modelled:

python
# No explicit status field, but there's a state machine hiding here
class FeedbackRequest:
    interview_id = Column(Integer)
    interviewer_id = Column(Integer)
    requested_at = Column(DateTime)
    reminded_at = Column(DateTime, nullable=True)
    feedback_id = Column(Integer, nullable=True)  # FK to Feedback if submitted

The implicit states are:

  • pending: requested_at set, feedback_id null, reminded_at null
  • reminded: reminded_at set, feedback_id null
  • submitted: feedback_id set

Extract to explicit:

entity FeedbackRequest {
    interview: Interview
    interviewer: Interviewer
    requested_at: Timestamp
    reminded_at: Timestamp?
    status: pending | reminded | submitted
}
Challenge: Scattered logic

The same conceptual rule might be spread across multiple places:

python
# In API handler
def accept_invitation(request):
    if invitation.status != 'pending':
        return error(400, "Already responded")
    ...

# In model
class Invitation:
    def can_accept(self):
        return self.expires_at > datetime.utcnow()

# In service
def process_acceptance(invitation, slot):
    if slot not in invitation.slots:
        raise InvalidSlot()
    ...

Consolidate into one rule:

rule CandidateAccepts {
    when: CandidateAccepts(invitation, slot)

    requires: invitation.status = pending
    requires: invitation.expires_at > now
    requires: slot in invitation.slots
    ...
}
Challenge: Dead code and historical accidents

Codebases accumulate features that were built but never used, workarounds for bugs that are now fixed, and code paths that are never executed.

Do not include these in the spec. If you are unsure:

  1. Check if the code is actually reachable
  2. Ask developers if it is intentional
  3. Check git history for context
Challenge: Missing error handling

Code might silently fail or have incomplete error handling:

python
def send_notification(user, message):
    try:
        slack.send(user.slack_id, message)
    except SlackError:
        pass  # Silently ignore failures

The spec should capture the intended behaviour, not the bug:

ensures: Notification.created(to: user, channel: slack)

Whether the current implementation properly handles failures is separate from what the system should do.

Challenge: Over-engineered abstractions

Enterprise codebases often have abstraction layers that obscure intent:

java
public interface NotificationStrategy {
    void notify(NotificationContext context);
}

public class SlackNotificationStrategy implements NotificationStrategy {
    @Override
    public void notify(NotificationContext context) {
        // Actual Slack call buried 5 levels deep
    }
}

Cut through to the actual behaviour. The spec does not need strategy patterns, dependency injection or abstract factories. Just: ensures: Notification.created(channel: slack, ...)

Checklist: Have you abstracted enough?

Before finalising a distilled spec:

  • No database column types (Integer, VARCHAR, etc.)
  • No ORM or query syntax
  • No HTTP status codes or API paths
  • No framework-specific concepts (middleware, decorators, etc.)
  • No programming language types (int, str, List, etc.)
  • No variable names from the code (use domain terms)
  • No infrastructure (Redis, Kafka, S3, etc.)
  • Foreign keys replaced with relationships
  • Tokens/secrets removed (implementation of identity)
  • Timestamps use domain Duration, not timedelta/seconds

If any remain, ask: "Would a stakeholder include this in a requirements doc?"

Checklist: Terminology consistency

  • Each concept has exactly one name throughout the spec
  • No "also known as" or "equivalent to" comments
  • Cross-referenced related specs for conflicting terms
  • Duplicate models in code flagged as technical debt to remove

After distillation

The extracted spec is a starting point. For targeted changes as requirements evolve, use the tend agent. For checking ongoing alignment between the spec and implementation, use the weed agent.

References

© DataDog, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/allium/skills/distill of DataDog/datadog-agent.

  • SKILL.md
  • references/worked-examples.md

Open the folder on GitHubat commit 20eff25

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in DataDog/datadog-agent, which our catalogue first saw on October 8, 2026.

Compare with similar skills

Distill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Distill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Distill this skillDataDog/datadog-agent3.8k1 repos~7kAutomated safety check: PassApache-2.0
Monitor CInrwl/nx29k6 repos~4.7kAutomated safety check: PassMIT
Terraform and OpenTofu Guideagentscope-ai/QwenPaw35k6 repos~4.2kAutomated safety check: PassApache-2.0
Vercel Optimize Auditvercel-labs/agent-skills32k9 repos~4.3kAutomated safety check: PassNone
Openclaw Live Updateropenclaw/openclaw392k—~3.7kAutomated safety check: PassMIT
Analyze GitHub Action Logswithastro/astro63k1 repos~1.3kAutomated safety check: PassCustom licence

Similar skills

  • Monitor CI

    nrwl/nx

    Monitor Nx Cloud CI pipeline and handle self-healing fixes. An agent skill from nrwl/nx.

    29k GitHub starsUsed in 6 repos~4.7k tokens
    DevOps & CloudAuto-check passed
  • Terraform and OpenTofu Guide

    agentscope-ai/QwenPaw

    Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.

    35k GitHub starsUsed in 6 repos~4.2k tokens
    DevOps & CloudAuto-check passed
  • Vercel Optimize Audit

    vercel-labs/agent-skills

    Official

    Runs a metrics-first audit of a deployed Vercel project, gating investigations on real signals to produce ranked, citation-backed cost and performance recommendations.

    32k GitHub starsUsed in 9 repos~4.3k tokens
    DevOps & CloudAuto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Official

    Analyze recent GitHub Actions workflow runs to identify patterns, mistakes, and improvements.

    63k GitHub starsUsed in 1 repo~1.3k tokens
    DevOps & CloudAuto-check passed
  • Creates and queries KubeSphere users, workspaces and projects and assigns built-in roles, defaulting to least privilege and never deleting anything.

    17k GitHub starsUsed in 1 repo~3.1k tokens
    DevOps & CloudAuto-check passed

More from DataDog/datadog-agent

All 35 skills in this repo
  • Triage CI Failure

    DataDog/datadog-agent

    Official

    Classify a failed CI as either caused by an active incident, flakiness, or a true code regression.

    3.8k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Elicit

    DataDog/datadog-agent

    Official

    Run a structured discovery session to build an Allium specification through conversation.

    3.8k GitHub starsUsed in 1 repo~3.7k tokens
    Auto-check passed
  • Follow PR

    DataDog/datadog-agent

    Official

    Monitor the current PR's GitLab pipeline to completion, then report success, auto-fix, or investigate a failure.

    3.8k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Create Epic Recap

    DataDog/datadog-agent

    Official

    A skill your agent uses when an engineer or manager asks to recap, summarize, or post an update on a Jira Epic — a progress update for an in-progress Epic (how far along it is, what's shipped so…

    3.8k GitHub stars~5k tokensUpdated today
    Auto-check: notes
  • Explain Lading Config

    DataDog/datadog-agent

    Official

    Explains a lading.yaml config file from the regression test suite, using the lading Rust source as ground truth for field meanings and defaults.

    3.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Run E2E

    DataDog/datadog-agent

    Official

    Run one already-written new-e2e test locally and triage the setup failures that stop it — "run the containers e2e tests", "my e2e run fails before any test starts".

    3.8k GitHub stars~2.2k tokensUpdated today
    Auto-check: notes

Categories

Questions about Distill

What does Distill do?

Extract an Allium specification from an existing codebase. An agent skill from DataDog/datadog-agent. Distill is an agent skill from DataDog/datadog-agent, published by the product's own GitHub organization. Extract an Allium specification from an existing codebase.

When should I use Distill?

Distill fits situations like: the user has existing code and wants to distil behaviour into a spec; reverse engineer a specification from implementation; generate a spec from code; turn implementation into a behavioural specification.

How do I install Distill in Claude Code?

Run `npx skills add DataDog/datadog-agent --skill distill -a claude-code`. Or copy the skill folder (.agents/skills/allium/skills/distill in DataDog/datadog-agent) into .claude/skills/distill in your project. Claude Code loads it when a task matches its description.

How do I install Distill in Codex?

Run `npx skills add DataDog/datadog-agent --skill distill -a codex`. Or copy the skill folder (.agents/skills/allium/skills/distill in DataDog/datadog-agent) into .agents/skills/distill in your project. Codex loads it when a task matches its description.

Can I use Distill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DataDog/datadog-agent --skill distill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/distill, .gemini/skills/distill, .github/skills/distill and .opencode/skills/distill in your project.

What does Distill need to run?

SKILL.md names no scripts, command-line tools or credentials: Distill is instructions for the agent only. Our summary lists: Python 3.

Does Distill access the network?

SKILL.md names 1 domain. In commands or code: slack.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Distill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Distill use?

Distill is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Distill use?

About 7k tokens (SKILL.md is roughly 28k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.4k tokens, read only when the agent opens those files.

What are the alternatives to Distill?

Skills that share tags, products or a category with Distill: Monitor CI (nrwl/nx, 29k stars), Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 35k stars), Vercel Optimize Audit (vercel-labs/agent-skills, 32k stars) and Openclaw Live Updater (openclaw/openclaw, 392k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Distill?

DataDog (a GitHub organization, an official publisher) maintains it in DataDog/datadog-agent, which has 3,757 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 8, 2026.

Source: DataDog/datadog-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.