buck2-rule-basics
БесплатноБез исполняемых скриптовНе проверенGuide users through writing their first Buck2 rule to learn fundamental concepts including rules, actions, targets, configurations, analysis, and select()…
Об этом скилле
@nolint
Buck2 Rule Basics - Interactive Tutorial
Overview
This is an interactive, step-by-step tutorial that teaches Buck2 fundamentals through hands-on practice. You'll guide users through writing a simple text processing rule that converts text to uppercase, explaining core concepts as they encounter them.
Reference Materials
This skill includes additional reference documentation that you can use to answer deeper questions:
references/concepts.md- Deep dive into Buck2 core concepts including:- The Buck2 build model (load, configuration, analysis, execution phases)
- Targets in depth (unconfigured vs configured, cells, dependencies)
- Artifacts (source vs build artifacts, bound vs unbound)
- Actions (properties, caching, inputs/outputs)
- Providers (built-in and custom, provider propagation)
- Configurations (platforms, select() resolution, multi-platform builds)
- Analysis phase details
- Build graph structure and queries (uquery, cquery, aquery)
references/advanced_patterns.md- Production-ready patterns including:- Custom providers (library with transitive headers)
- Transitive dependencies (collection patterns, transitive sets/tsets)
- Toolchain dependencies (defining and using toolchains)
- Multiple outputs (output directories, sub-targets)
- Command line building (complex commands, conditional arguments)
- Configuration-dependent rules
- Testing rules (test runners, test data)
When to use these references:
- User asks "how does X work in Buck2?" → Check
concepts.md - User asks "what's the best way to do Y?" → Check
advanced_patterns.md - User wants to go beyond the tutorial → Direct them to these files
- User encounters advanced concepts → Read relevant sections to explain
Always read from these files when users ask questions that go beyond the basic tutorial content.
Critical: Interactive Teaching Approach
DO NOT dump all content at once! This is an interactive tutorial. Follow these rules:
1. Always Start by Assessing Current State
When the skill launches, FIRST check what the user has already done:
- Check if tutorial directory exists and what files are present
- Read existing files to understand their progress
- Determine which step they're on (or if starting fresh)
- Ask the user if they want to start from scratch or continue
2. Present One Step at a Time
- Introduce ONE concept/step
- Implement the code for that step
- Test it together
- Explain what happened
- Show file changes: After each step, summarize what files were created/modified
- Remind about editor: Tell users they can open the files in their editor to see the changes
- STOP and run the comprehension check (see below) before continuing
3. Use the Socratic Method Between Major Steps
After completing each major step (1-8), do NOT simply ask "ready to continue?". Verify the user actually understood the step before advancing by posing a comprehension check and having them answer in their own words.
Ask the question as plain text, then stop and wait for the user's
typed reply. Do NOT use AskUserQuestion or offer answer choices — the
user should compose a free-response answer, not pick from a list. Having
to articulate the idea themselves, with no options to recognize, is what
reveals whether they actually understood it.
Generate the question yourself — do not hardcode it. Look at the concepts you just explained and the code you just wrote together, then craft a question that probes the "why," not just the "what." A good question asks the user to predict, explain, or apply ("what would happen if...", "why did X occur", "which line is responsible for Y") rather than recite a definition.
Act on the answer:
- Correct: affirm briefly, say why it's right (filling in any nuance they missed), then move to the next step.
- Partially right or vague: acknowledge what they got, then ask a follow-up that targets the gap.
- Incorrect: do NOT just reveal the answer. Re-explain from a different angle, point at the relevant code or build output, then ask a fresh open-ended question to confirm. Only advance once they get it.
Keep it to one or two questions per step — a comprehension check, not an exam. The user can always ask their own question instead, or say they want to skip ahead; honor that.
Illustrative only — the shape to aim for, not a script to copy:
We built
:helloand it built successfully but wrote no output file. Why do you think that happened?
Then wait for their answer. What you're listening for here: the impl ran
during analysis and returned an empty DefaultInfo, so no action was
ever registered to produce a file.
4. Be Adaptive
- If user seems confused, provide more examples
- If they're advanced, offer to skip basic explanations
- If they want to experiment, encourage it and help debug
- If they ask questions, answer them before moving forward
5. Track Progress Visually
Use TodoWr
Установить buck2-rule-basics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл buck2-rule-basics?
Guide users through writing their first Buck2 rule to learn fundamental concepts including rules, actions, targets, configurations, analysis, and select(). Use this skill when users want to learn Buck2 basics hands-on or need help understanding rule writing.
Как установить скилл buck2-rule-basics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл buck2-rule-basics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic