Skip to content

Commit 21e26fe

Browse files
TC-MOclaudemarcel-rbro
authored
chore: consolidate AI agent instructions into single AGENTS.md source… (#2262)
- Remade `AGENTS.md` as the single source of truth for project architecture, commands, writing style, and terminology - merging content from `.github/copilot-instructions.md` (build pipeline, architecture details, gotchas) with existing style standards - Slimmed .`claude/instructions.md` from 257 to 40 lines - removes duplication with `AGENTS.md` and auto-loaded `.claude/rules/`, keeps only Claude-specific context (skills, PR format) - Slimmed `.github/copilot-instructions.md` from 201 to 15 lines - points to `AGENTS.md` instead of duplicating content - Restructured all 4 Claude skills (`tutorial`, `review-docs`, `doc-write`, `api-doc`) per Anthropic's skills guide: added YAML frontmatter with trigger phrases, applied progressive disclosure by moving templates/examples to references/ directories, added troubleshooting sections and concrete usage examples --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Marcel Rebro <marcel.rebro@apify.com>
1 parent c8c10f6 commit 21e26fe

12 files changed

Lines changed: 1069 additions & 1372 deletions

File tree

.claude/instructions.md

Lines changed: 21 additions & 237 deletions
Original file line numberDiff line numberDiff line change
@@ -1,256 +1,40 @@
11
# Claude Code instructions for Apify documentation
22

3-
## Project overview
3+
Read `AGENTS.md` first - it is the single source of truth for project architecture, commands, writing style, and terminology.
44

5-
You are working on the Apify documentation repository, which contains:
5+
## Claude Code specifics
66

7-
- **Platform documentation**: Core platform features and functionality (`/sources/platform/`)
8-
- **Academy**: Educational content and tutorials (`/sources/academy/`)
9-
- **API reference**: OpenAPI specifications (`/apify-api/`)
7+
Detailed documentation standards are auto-loaded from `.claude/rules/`:
108

11-
The project uses Docusaurus with MDX, follows Microsoft style guide principles, and has comprehensive style guidelines.
9+
- `writing-style.md` - Language, tone, grammar, headings
10+
- `content-standards.md` - Front matter, formatting, code examples, links, images
11+
- `terminology.md` - Apify product capitalization
12+
- `file-organization.md` - Naming and directory structure
13+
- `quality-standards.md` - Pre-submission checklist
1214

13-
## Primary reference documents
14-
15-
**Always reference these files when working on documentation**:
16-
17-
1. **AGENTS.md** - Primary vendor-agnostic documentation standards (READ THIS FIRST)
18-
2. **.claude/rules/** - Claude Code-specific standards (AUTO-LOADED)
19-
- `writing-style.md` - Language, tone, grammar, and writing guidelines
20-
- `content-standards.md` - Formatting, front matter, code examples, links, images
21-
- `terminology.md` - Apify-specific capitalization and terminology
22-
- `file-organization.md` - File naming and directory structure
23-
- `quality-standards.md` - Comprehensive quality checklist
24-
3. **CONTRIBUTING.md** - Contribution guidelines, setup, and workflows
25-
4. `.cursor/rules/*.mdc` - Cursor-specific rules (for reference)
15+
These rules expand on the standards in `AGENTS.md` with detailed examples and tables.
2616

2717
## Available skills
2818

29-
Use these skills for specific documentation tasks:
30-
31-
### `/doc-write` - Documentation writing
32-
33-
**When to use**: Creating or editing documentation pages
34-
**Handles**: Content creation, formatting, style guide compliance
35-
36-
### `/api-doc` - API documentation
37-
38-
**When to use**: Working with OpenAPI specifications
39-
**Handles**: Creating endpoints, schemas, code samples
40-
41-
### `/tutorial` - Tutorial creation
42-
43-
**When to use**: Creating step-by-step tutorials
44-
**Handles**: Tutorial structure, learning content, examples
45-
46-
### `/review-docs` - Documentation review
47-
48-
**When to use**: Reviewing documentation before submission
49-
**Handles**: Style guide compliance, quality checks, consistency
50-
51-
## Documentation standards
52-
53-
All documentation standards are defined in `.claude/rules/` and are auto-loaded by Claude Code:
54-
55-
- **Writing style**: See `writing-style.md` for language, tone, grammar, headings, and word choice
56-
- **Content formatting**: See `content-standards.md` for front matter, text formatting, admonitions, code examples, links, and images
57-
- **Terminology**: See `terminology.md` for Apify-specific capitalization and product names
58-
- **File organization**: See `file-organization.md` for naming conventions and directory structure
59-
- **Quality assurance**: See `quality-standards.md` for comprehensive pre-submission checklist
60-
61-
**Quick reference**:
62-
63-
- Use sentence case for headings (not Title Case)
64-
- Bold only for UI elements (not emphasis)
65-
- All admonitions must have titles
66-
- Front matter required (title, description 140-160 chars, sidebar_position, slug)
67-
- Use descriptive link text (never "click here")
68-
- All code blocks must specify language
69-
70-
## File organization
71-
72-
### Naming conventions
19+
| Skill | When to use |
20+
|---|---|
21+
| `/doc-write` | Creating or editing documentation pages |
22+
| `/api-doc` | Working with OpenAPI specifications |
23+
| `/tutorial` | Creating step-by-step tutorials |
24+
| `/review-docs` | Reviewing documentation before submission |
7325

74-
- Use **kebab-case** for file names: `web-scraping-basics.md` (never camelCase or snake_case)
75-
- Use descriptive names that reflect content
76-
- Group related files in logical directories
77-
- **Match slug to file path** for consistency
26+
## PR title format
7827

79-
### Directory structure
80-
81-
```text
82-
sources/
83-
├── platform/ # Platform documentation
84-
│ ├── actors/ # Actor-related content
85-
│ ├── storage/ # Storage documentation
86-
│ └── integrations/ # Integration guides
87-
└── academy/ # Educational content
88-
├── tutorials/ # Step-by-step guides
89-
└── webscraping/ # Web scraping courses
90-
```
91-
92-
## API documentation specifics
93-
94-
See the `/api-doc` skill for comprehensive OpenAPI specification standards, operation ID conventions, and path file naming.
95-
96-
## Development workflow
97-
98-
### Before starting work
99-
100-
1. Read `AGENTS.md` for documentation standards
101-
2. Review `CONTRIBUTING.md` for specific guidelines
102-
3. Check existing similar documentation for patterns
103-
4. Determine which skill to use for the task
104-
105-
### During development
106-
107-
1. Follow the appropriate skill instructions
108-
2. Reference `AGENTS.md` for style questions
109-
3. Use proper front matter in all files
110-
4. Include complete, tested code examples
111-
5. Add descriptive links and alt text
112-
113-
### Before submitting
114-
115-
1. Run linting checks:
116-
117-
```bash
118-
npm run lint:md # Markdownlint - Markdown syntax/formatting
119-
npm run lint:code # ESLint - Code linting
120-
121-
# Run locally for more detailed output:
122-
npx markdownlint "path/to/file.md" # Markdownlint - Check specific files
123-
vale sync # Vale - Download styles (first time)
124-
vale "path/to/file.md" --minAlertLevel=error # Vale - Check prose style
125-
```
126-
127-
2. Use `/review-docs` skill to check compliance
128-
3. Verify all code examples work
129-
4. Check all links are valid
130-
5. Ensure front matter is complete
131-
132-
### Creating pull requests
133-
134-
When creating PRs for this repository, follow these requirements:
135-
136-
**PR Title Format**: Use [Conventional Commits](https://www.conventionalcommits.org/) format:
28+
Use [Conventional Commits](https://www.conventionalcommits.org/) - enforced by CI:
13729

13830
- `docs: <description>` - Documentation changes (most common)
13931
- `fix: <description>` - Bug fixes
14032
- `feat: <description>` - New features
14133
- `chore: <description>` - Maintenance tasks
142-
- `refactor: <description>` - Code refactoring
143-
- `test: <description>` - Test updates
144-
145-
**Examples**:
14634

147-
-`docs: fix grammatical error in residential proxy documentation`
148-
-`docs: add missing actor.json properties`
149-
-`fix: correct data retention period in storage docs`
150-
-`Fix grammatical error` (missing type prefix)
151-
-`Documentation Update` (wrong format)
35+
## Key reminders
15236

153-
**Enforcement**: PR titles are validated by GitHub Actions. PRs with incorrect titles will fail CI checks.
154-
155-
**Reference**: See `CONTRIBUTING.md` and `.github/workflows/check-pr-title.yaml`
156-
157-
### Testing changes
158-
159-
```bash
160-
npm install # Install dependencies
161-
npm start # Start development server
162-
npm test # Validate OpenAPI specs (if applicable)
163-
npm run build # Test production build
164-
```
165-
166-
## Common patterns
167-
168-
See respective skills for content-type specific patterns:
169-
170-
- **Tutorials**: See `/tutorial` skill for 8-section tutorial structure
171-
- **Platform documentation**: See `/doc-write` skill for feature documentation patterns
172-
- **API documentation**: See `/api-doc` skill for endpoint documentation patterns
173-
174-
## Quality checklist
175-
176-
Before considering any documentation complete, see `quality-standards.md` for the comprehensive checklist and use the `/review-docs` skill for final review.
177-
178-
## Best practices
179-
180-
- Start with user's goal/problem
181-
- Provide context before technical details
182-
- Use consistent Apify terminology (see `terminology.md`)
183-
- Structure content logically (basic → advanced)
184-
- Link to related content
185-
- Test all code examples before committing
18637
- Never make assumptions about product features - ask if unsure
187-
- For code review: check comments and obvious mistakes only
188-
189-
## Content review process
190-
191-
### Before reviewing a PR
192-
193-
- Check that the latest changes were pulled from the feature branch
194-
195-
### Review checklist
196-
197-
When reviewing or creating documentation, verify:
198-
199-
- **Clarity**: Instructions are easy to understand
200-
- **Consistency**: Uniform terminology (see word list above) and style throughout
201-
- **Grammar & Spelling**: Correct errors, use American English with Oxford commas
202-
- **Structure**: Logical flow, no duplicate content, appropriate headings/lists
203-
- **Links**: Verify all links are functional and relevant, link key terms to their docs
204-
- **Code snippets**: Developer-provided; check comments and obvious mistakes only (not full code review)
205-
206-
## Getting help
207-
208-
If you're unsure about:
209-
210-
- **Style questions**: Check `AGENTS.md` first
211-
- **Setup issues**: See `CONTRIBUTING.md`
212-
- **API documentation**: See `/api-doc` skill
213-
- **Tutorial structure**: See `/tutorial` skill
214-
- **Review process**: See `/review-docs` skill
215-
- **Product features**: Never make assumptions - ask if unsure
216-
217-
## Project-specific context
218-
219-
### Multiple repositories
220-
221-
The full documentation ecosystem includes multiple repos:
222-
223-
- apify-docs (this repo) - Platform, Academy, OpenAPI
224-
- apify-client-js - JavaScript client docs
225-
- apify-client-python - Python client docs
226-
- apify-sdk-js - JavaScript SDK docs
227-
- apify-sdk-python - Python SDK docs
228-
- apify-cli - CLI documentation
229-
230-
### Theme
231-
232-
Uses `@apify/docs-theme` package - don't modify theme files directly.
233-
234-
### Deployment
235-
236-
- Automatic deployment on merge to `master`
237-
- Preview builds available for pull requests
238-
- Uses nginx for routing between repositories
239-
240-
### Linting tools
241-
242-
- **markdownlint** - Markdown syntax and formatting validation
243-
- **eslint** - JavaScript/TypeScript code linting
244-
- **Vale** - Prose style checking (optional, download styles with `vale sync`)
245-
246-
## Remember
247-
248-
The goal is to help users succeed with Apify. Every piece of documentation should:
249-
250-
- Be **clear** and easy to understand
251-
- Be **accurate** and technically correct
252-
- Be **actionable** with concrete examples
253-
- Follow the **style guide** consistently
254-
- Provide **real value** to users
255-
256-
When in doubt, prioritize clarity and usefulness over strict adherence to rules. But always maintain consistency within the documentation set.
38+
- For code review: check comments and obvious mistakes only (not full code review)
39+
- Prioritize clarity and usefulness over strict rule adherence
40+
- See `CONTRIBUTING.md` for development setup and contribution workflow

0 commit comments

Comments
 (0)