AgentSkillsCN

guide-loader

当需要专业化的指南内容时使用——从用户配置的路径加载,或根据任务关键词从在线开发指南中获取相关内容。

SKILL.md
--- frontmatter
name: guide-loader
description: Use when needing specialized guide content - loads from user's configured path or fetches from online dev-guides based on task keywords
version: 2.0.0
model: haiku
user-invocable: false

Guide Loader

Load development guides into context when needed. Two sources: user's local guides path, or online dev-guides via WebFetch.

Activation

Activate when:

  • Designing or implementing features that match guide topics
  • User requests a specific guide
  • Invoked by other skills (guide-integrator, task-context-loader)
  • "Load the ECA guide" or "What does my guide say about..."

Workflow

1. Check for Local Guides Path

Read {project_path}/project_state.md and look for:

markdown
**Guides Path:** {path}

If found, go to Step 2a (local). If not found, go to Step 2b (online).

2a. Load from Local Path

If specific guide requested, use that filename. Otherwise, match topic to guide:

Topic KeywordsGuide File
ECA, event, workflow, automationeca_development_guide.md
field, entity, bundle, content typedrupal_fields_entities_guide.md
form, settings, config, admindrupal_configuration_forms_guide.md
theme, CSS, SCSS, Bootstrapbootstrap_*.md
SDC, component, Twigsdc_*.md
Radix, subthemeradix_*.md
development, workflow, processdrupal_development_guide.md

Read {guides_path}/{guide_file}. If not found, fall back to Step 2b (online).

2b. Fetch from Online Dev-Guides

WebFetch from https://camoa.github.io/dev-guides/ based on topic keywords:

Topic KeywordsDev-Guides URL
form, validation, form alterdrupal/forms/
config form, settings formdrupal/config-forms/
entity, field, content typedrupal/entities/
plugin, plugin type, annotationdrupal/plugins/
route, access, permissiondrupal/routing/
service, dependency injectiondrupal/services/
cache, cache tag, cache contextdrupal/caching/
config, config schemadrupal/config-management/
render, render array, #themedrupal/render-api/
security, XSS, SQL injectiondrupal/security/
SDC, component, single directorydrupal/sdc/
JavaScript, behaviors, oncedrupal/js-development/
views, display, filterdrupal/views/
block, block plugindrupal/blocks/
layout builder, sectiondrupal/layout-builder/
migration, migrate, D7drupal/migration/
recipe, config actiondrupal/recipes/
taxonomy, vocabulary, termdrupal/taxonomy/
media, media type, oembeddrupal/media/
image style, responsive imagedrupal/image-styles/
test, PHPUnit, kernel testdrupal/testing/
JSON:API, jsonapi, RESTdrupal/jsonapi/
icon, icon packdrupal/icon-api/
ECA, event condition actiondrupal/eca/
GitHub Actions, CI/CDdrupal/github-actions/
CSS, SCSS, BEM, Bootstrapdesign-systems/bootstrap/
Radix, sub-themedesign-systems/radix-sdc/

Steps:

  1. WebFetch https://camoa.github.io/dev-guides/{topic_url} for the topic index
  2. Identify the specific atomic guide from the index
  3. WebFetch that atomic guide URL

3. Present Guide Content

Format as:

code
## Guide Loaded: {guide name}

### Source
{Local: path | Online: URL}

### Relevant Sections for Current Task
1. **{Section Name}** - {why relevant}
   {Key points}

### Key Patterns
- {Pattern 1}
- {Pattern 2}

### Warnings
- {Important gotcha from guide}

4. Integrate with Current Work

Based on guide content, suggest:

code
Apply to current task:
- {Specific recommendation from guide}
- {Pattern to follow}
- {Thing to avoid}

Add these to architecture/implementation? (yes/no)

Stop Points

STOP and wait for user:

  • If requested guide not found locally or online
  • After presenting guide content (ask if need more)