Skip to content

Commit 0395d75

Browse files
committed
feat: make docs_lookup privacy-friendly — webfetch default, ctx7 opt-in
Fetch documentation directly from official docs sites (docs.snowflake.com, duckdb.org, postgresql.org, etc.) by default. No user data is sent to third-party services unless explicitly opted in via ALTIMATE_DOCS_PROVIDER=ctx7. Key changes: - Webfetch is now the default provider (direct to official docs) - Context7 is opt-in only via ALTIMATE_DOCS_PROVIDER=ctx7 env var - Added smart page matching: query keywords are matched against curated URL mappings to find the most relevant documentation page - Library tools (e.g. duckdb, psycopg2) now fall back to their platform's official docs when no ctx7 provider is configured - Extracted fetchFromWebsite and fetchFromCtx7 helper functions - Updated SKILL.md with privacy section and updated instructions https://claude.ai/code/session_01NZPdvEHNXDcmhgJt9RLMu1
1 parent 4f297ee commit 0395d75

2 files changed

Lines changed: 241 additions & 90 deletions

File tree

.opencode/skills/data-docs/SKILL.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ of relying on training data.
1818
## Requirements
1919
**Tools used:** docs_lookup, glob, read
2020

21+
## Privacy
22+
23+
By default, documentation is fetched **directly from official documentation sites**
24+
(e.g., docs.snowflake.com, duckdb.org, postgresql.org). No user data is sent to
25+
third-party services.
26+
27+
Optionally, set `ALTIMATE_DOCS_PROVIDER=ctx7` to use Context7 for richer
28+
library/SDK documentation. Note: this sends queries to context7.com (third-party).
29+
2130
## When to Use
2231

2332
Activate this skill when the user:
@@ -65,9 +74,7 @@ docs_lookup(tool="postgresql", query="JSONB operators and functions")
6574
docs_lookup(tool="clickhouse", query="MergeTree engine settings")
6675
```
6776

68-
The tool automatically selects the best method:
69-
- **Context7 (ctx7)** for Python libraries/SDKs — indexed, searchable docs
70-
- **Web fetch** for database platforms — fetches from official documentation sites
77+
The tool fetches documentation directly from official docs sites by default.
7178

7279
For platform docs with a **specific page URL** (see `references/library-ids.md`),
7380
pass it via the `url` parameter for better results:
@@ -86,13 +93,13 @@ docs_lookup(tool="postgresql", query="JSON functions", url="https://www.postgres
8693

8794
## Supported Tools
8895

89-
**Libraries/SDKs (via Context7):** dbt-core, airflow, pyspark, snowflake-connector-python,
96+
**Libraries/SDKs:** dbt-core, airflow, pyspark, snowflake-connector-python,
9097
snowpark-python, google-cloud-bigquery, databricks-sdk, duckdb, psycopg2, psycopg,
9198
clickhouse-connect, confluent-kafka, sqlalchemy, polars, pandas, great-expectations,
9299
dbt-utils, dbt-expectations, dbt-snowflake, dbt-bigquery, dbt-databricks, dbt-postgres,
93100
dbt-redshift, dbt-spark, dbt-duckdb, dbt-clickhouse, elementary
94101

95-
**Platforms (via web fetch):** snowflake, databricks, duckdb, postgresql, clickhouse, bigquery
102+
**Platforms (official docs):** snowflake, databricks, duckdb, postgresql, clickhouse, bigquery
96103

97104
## Guidelines
98105

0 commit comments

Comments
 (0)