agentleFS
datafusion-contribdatafusion-contrib/datafusion-skills/skills/datafusion-docs/SKILL.md

datafusion-docs

Skill14 starsChanged 8 months agoApache-2.0View on GitHub

Search Apache DataFusion documentation, user guide, and API reference. Returns relevant documentation for a question or keyword. Searches the official DataFusion repository and website.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow these steps in order.

    line 15
  2. Distinctive:

    If the input is a natural language question (e.g.

    line 19
  3. Very specific:

    If the input is already a function name or technical term (e.g.

    line 21
  4. Very specific:

    Use the extracted terms as SEARCH_QUERY in the next steps.

    line 23
  5. Very specific:

    Important: Do NOT quote multi-word search terms as a single string.

    line 29
  6. Very specific:

    If gh is not available, fall back to the GitHub API:

    line 37
  7. Distinctive:

    If the query is about API usage or implementation patterns, search Rust source code:

    line 59
  8. Distinctive:

    If the file is too large, fetch just the relevant section.

    line 73
  9. Distinctive:

    If the search didn't find exactly what the user needed:

    line 91
  10. Distinctive:

    If the query is about a specific SQL function:

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

You are helping the user find relevant Apache DataFusion documentation.

Query: $@

Follow these steps in order.

Step 1 — Extract search terms

If the input is a natural language question (e.g. "how do I create an external table"), extract the key technical terms: nouns, function names, SQL keywords. Drop stop words.

If the input is already a function name or technical term (e.g. APPROX_PERCENTILE_CONT, CREATE EXTERNAL TABLE), use it as-is.

Use the extracted terms as SEARCH_QUERY in the next steps.

Step 2 — Search the DataFusion source documentation

The DataFusion user guide is in the GitHub repo under docs/. Search it using gh:

Important: Do NOT quote multi-word search terms as a single string. Pass each word as a separate token so gh search code matches broadly. For example, use EXTERNAL TABLE not "EXTERNAL TABLE".

gh search code $SEARCH_QUERY --repo apache/datafusion --language markdown --limit 10

If gh is not available, fall back to the GitHub API:

gh api "search/code?q=$SEARCH_QUERY+repo:apache/datafusion+extension:md&per_page=10" --jq '.items[:10][] | "\(.path)"'

Step 3 — Search for SQL function documentation

DataFusion's built-in functions are documented in docs/source/user-guide/sql/. Check specifically:

gh search code "$SEARCH_QUERY" --repo apache/datafusion --language markdown --limit 5 -- path:docs/source/user-guide/sql/

Also list the available SQL doc files so you can fetch the most relevant one directly:

gh api "repos/apache/datafusion/contents/docs/source/user-guide/sql" --jq '.[].name' 2>/dev/null

Step 4 — Search for code examples

If the query is about API usage or implementation patterns, search Rust source code:

gh search code "$SEARCH_QUERY" --repo apache/datafusion --language rust --limit 5

Step 5 — Fetch and present relevant content

For the most relevant results (top 2-3), fetch the actual content:

gh api "repos/apache/datafusion/contents/<path>" --jq '.content' | base64 -d

If the file is too large, fetch just the relevant section. Look for the search terms in the content and extract the surrounding context (heading + content under that heading).

Step 6 — Present findings

Organize the results by relevance:

  1. Most relevant: Direct documentation for the queried topic
  2. Examples: Code examples showing usage
  3. Related: Related documentation that might be helpful

For each result, provide:

  • The document title or section heading
  • A brief summary of what it covers
  • The source URL (GitHub link to the file)
  • Key code snippets if applicable

Step 7 — Suggest follow-ups

If the search didn't find exactly what the user needed:

You can also check the DataFusion user guide at https://datafusion.apache.org/user-guide/ or the API docs at https://docs.rs/datafusion/latest/datafusion/

If the query is about a specific SQL function:

Try running datafusion-cli -c "SELECT * FROM information_schema.df_settings WHERE name LIKE '%<keyword>%';" to see related configuration options.

Quick reference — Common DataFusion topics

For faster lookups, here are paths to key documentation sections:

TopicPath in repo
SQL Referencedocs/source/user-guide/sql/
Scalar Functionsdocs/source/user-guide/sql/scalar_functions.md
Aggregate Functionsdocs/source/user-guide/sql/aggregate_functions.md
Window Functionsdocs/source/user-guide/sql/window_functions.md
CREATE EXTERNAL TABLEdocs/source/user-guide/sql/ddl.md
Data Typesdocs/source/user-guide/sql/data_types.md
Configurationdocs/source/user-guide/configs.md
Python Bindingsdocs/source/user-guide/python/
Library Usagedocs/source/library-user-guide/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.