Skip to content

Commit dbd83cf

Browse files
timsaucerclaude
andcommitted
docs: replace raw SKILL.md include with a human-written AI-assistants page
The previous approach embedded the repo-root `SKILL.md` on the docs site via a myst `{include}`. That file is written for agents -- dense, skill-formatted, and not suited to a human browsing the User Guide. It also relied on a fragile `:start-line:` offset to strip YAML frontmatter. Replace it with `docs/source/ai-coding-assistants.md`, a short human-readable page that mirrors the README section added in #1503: what the skill is, how to install it via `npx skills` or a manual pointer, and what kinds of things it covers. `SKILL.md` stays at the repo root as the single source of truth; agents fetch the raw GitHub URL directly. `llms.txt` is updated to point its Agent Guide entry at `raw.githubusercontent.com/.../SKILL.md` and to include the new human-readable page as a secondary link. The User Guide toctree now references `ai-coding-assistants` in place of the removed `skill` stub. Verified with `sphinx-build -W --keep-going` against the full docs tree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6336e00 commit dbd83cf

4 files changed

Lines changed: 85 additions & 24 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!---
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
# Using DataFusion with AI Coding Assistants
21+
22+
If you write DataFusion Python code with an AI coding assistant — Claude
23+
Code, Cursor, Windsurf, Cline, Codex, Copilot, Gemini CLI, or any other
24+
agent that supports skill discovery — this project ships machine-readable
25+
guidance so the assistant produces idiomatic code rather than guessing from
26+
its training data.
27+
28+
## What is published
29+
30+
- **[`SKILL.md`](https://github.com/apache/datafusion-python/blob/main/SKILL.md)**
31+
a dense, skill-oriented reference covering imports, data loading,
32+
DataFrame operations, expression building, SQL-to-DataFrame mappings,
33+
idiomatic patterns, and common pitfalls. Follows the
34+
[Agent Skills](https://agentskills.io) open standard.
35+
- **[`llms.txt`](llms.txt)** — an entry point for LLM-based tools
36+
following the [llmstxt.org](https://llmstxt.org) convention. Categorized
37+
links to the skill, user guide, API reference, and examples.
38+
39+
Both files live at stable URLs so an agent can discover them without a
40+
checkout of the repo.
41+
42+
## Installing the skill
43+
44+
**Preferred:** run
45+
46+
```shell
47+
npx skills add apache/datafusion-python
48+
```
49+
50+
This installs the skill in any supported agent on your machine (Claude
51+
Code, Cursor, Windsurf, Cline, Codex, Copilot, Gemini CLI, and others).
52+
The command writes the pointer into the agent's configuration so that any
53+
project you open that uses DataFusion Python picks up the skill
54+
automatically.
55+
56+
**Manual:** if you are not using the `skills` registry, paste this single
57+
line into your project's `AGENTS.md` or `CLAUDE.md`:
58+
59+
```
60+
For DataFusion Python code, see https://github.com/apache/datafusion-python/blob/main/SKILL.md
61+
```
62+
63+
Most assistants resolve that pointer the first time they see a
64+
DataFusion-related prompt in the project.
65+
66+
## What the skill covers
67+
68+
Writing DataFusion Python code has a handful of conventions that are easy
69+
for a model to miss — bitwise `&` / `|` / `~` instead of Python
70+
`and` / `or` / `not`, the lazy-DataFrame immutability model, how window
71+
functions replace SQL correlated subqueries, the `case` / `when` builder
72+
syntax, and the `in_list` / `array_position` options for membership
73+
tests. The skill enumerates each of these with short, copyable examples.
74+
75+
It is *not* a replacement for this user guide. Think of it as a distilled
76+
reference the assistant keeps open while it writes code for you.
77+
78+
## If you are an agent author
79+
80+
The skill file and `llms.txt` are the two supported integration points.
81+
Both are versioned along with the release and follow open standards — no
82+
project-specific handshake is required.

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Example
7878
user-guide/configuration
7979
user-guide/sql
8080
user-guide/upgrade-guides
81-
skill
81+
ai-coding-assistants
8282

8383

8484
.. _toc.contributor_guide:

docs/source/llms.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
## Agent Guide
66

7-
- [SKILL.md (agent skill)](https://datafusion.apache.org/python/skill.html): idiomatic DataFrame API patterns, SQL-to-DataFrame mappings, common pitfalls, and the full `functions` catalog. Primary source of truth for writing datafusion-python code.
7+
- [SKILL.md (agent skill, raw)](https://raw.githubusercontent.com/apache/datafusion-python/main/SKILL.md): idiomatic DataFrame API patterns, SQL-to-DataFrame mappings, common pitfalls, and the full `functions` catalog. Primary source of truth for writing datafusion-python code.
8+
- [Using DataFusion with AI coding assistants](https://datafusion.apache.org/python/ai-coding-assistants.html): human-readable guide for installing the skill and manual setup pointers.
89

910
## User Guide
1011

docs/source/skill.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)