sf-create-agentsmd
SF Create AGENTS.md
You are a code agent. Your task is to generate a new AGENTS.md or review an existing one for the current repository. The AGENTS.md must follow the conventions described in this skill and be tailored to what actually exists in the project.
AGENTS.md is an open format (agents.md specification) that provides coding agents with the context and instructions they need to work effectively on a project. It complements README.md with agent-specific technical instructions.
Mode Detection
Determine the mode based on what exists in the project root:
-
Pkg-managed project (
fs-pkg.jsonexists): the root AGENTS.md is managed by the infrastructure package system — never overwrite it. Instead, check for.agents/AGENTS.project.md:a. File exists and has real content (not just whitespace or empty frontmatter): warn the user that both AGENTS.md and the project additions file are already populated. Stop — do not generate.
b. File exists but is empty: switch to Project Additions mode — run the normal discovery, but generate content into
.agents/AGENTS.project.mdinstead of the root AGENTS.md. Focus on project-specific additions that complement the pkg-managed base (project overview, setup specifics, code style overrides, testing commands, etc.). Do not duplicate conventions already covered by the pkg-managed AGENTS.md.c. File does not exist: check whether the root AGENTS.md references
.agents/AGENTS.project.md. If referenced (the slot exists but the file is missing), offer to create and populate it — same as case (b). If not referenced, warn the user that this is a pkg-managed project with no project extension point and suggest they create.agents/AGENTS.project.mdmanually or update their package to include the reference. -
No AGENTS.md exists → Scaffold mode: discover the project and generate a full AGENTS.md.
More from sparkfabrik/sf-awesome-copilot
drupal-cache-debugging
Drupal cache debugging techniques and troubleshooting workflows. Use when asked about X-Drupal-Cache headers interpretation, finding max-age 0 sources, WebProfiler usage, cache hit/miss analysis, stale content debugging, or performance profiling cache-related issues.
21drupal-cache-contexts
Drupal cache contexts implementation guide. Use when asked about request-based cache variations, user.roles vs user context, URL contexts, language contexts, custom cache contexts, or cache context hierarchy. Helps prevent cache explosion from overly broad contexts.
21drupal-cache-tags
Drupal cache tags implementation guide. Use when asked about cache tag naming conventions, entity tags, list tags, custom tags, tag invalidation strategies, or debugging tag-based cache invalidation issues. Covers node:ID, config:name, entity_list patterns.
18drupal-lazy-builders
Drupal lazy builders and placeholder implementation. Use when asked about #lazy_builder render array property, TrustedCallbackInterface, auto-placeholdering, BigPipe integration, personalized content caching, or how to make user-specific content cacheable.
18drupal-cache-maxage
Drupal cache max-age configuration and behavior. Use when asked about time-based cache expiration, Cache::PERMANENT, max-age 0 issues, why Page Cache ignores max-age, or when content appears stale despite time expiration. Critical for understanding caching layer differences.
17drupal-dynamic-cache
Dynamic Page Cache and BigPipe module behavior in Drupal. Use when asked about authenticated user caching, auto-placeholdering, lazy builders, BigPipe streaming, X-Drupal-Dynamic-Cache header, or why content shows UNCACHEABLE status. Covers interaction between caching layers.
16