diff --git a/CLAUDE.md b/CLAUDE.md index b9182ad..aceef05 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -56,3 +56,21 @@ allowed-tools: Skill(pinecone:assistant *), Bash, Read You can safely assume the Pinecone MCP will be installed if a user installs the Claude Code Plugin. Check the .mcp.json file if in doubt. --- + +## Source Tags + +All Python scripts that create a `Pinecone()` client must include a `source_tag` to attribute usage to this plugin. See [Pinecone docs on source tags](https://docs.pinecone.io/integrations/build-integration/attribute-usage-to-your-integration). + +Use the format: `claude_code_plugin:` or `claude_code_plugin:_` — add the operation suffix when it helps distinguish scripts within the same skill. + +Only lowercase letters, numbers, underscores, and colons are allowed — no spaces, hyphens, or uppercase. + +Examples: +```python +pc = Pinecone(api_key=api_key, source_tag="claude_code_plugin:assistant") +pc = Pinecone(api_key=api_key, source_tag="claude_code_plugin:quickstart_upsert") +``` + +The base skills repo may use generic source tags like `pinecone_skills:*`. When adapting for Claude Code, replace these with the `claude_code_plugin:` prefix. + +--- diff --git a/skills/quickstart/scripts/quickstart_complete.py b/skills/quickstart/scripts/quickstart_complete.py index c07643a..c8e8523 100644 --- a/skills/quickstart/scripts/quickstart_complete.py +++ b/skills/quickstart/scripts/quickstart_complete.py @@ -12,7 +12,7 @@ if not api_key: raise ValueError("PINECONE_API_KEY environment variable not set") -pc = Pinecone(api_key=api_key, source_tag="pinecone_skills:index_quickstart") +pc = Pinecone(api_key=api_key, source_tag="claude_code_plugin:quickstart_complete") # 1. Create a serverless index with an integrated embedding model index_name = "quickstart" diff --git a/skills/quickstart/scripts/upsert.py b/skills/quickstart/scripts/upsert.py index 1642bef..4e2b996 100644 --- a/skills/quickstart/scripts/upsert.py +++ b/skills/quickstart/scripts/upsert.py @@ -22,7 +22,7 @@ def main( typer.echo("Error: PINECONE_API_KEY environment variable not set", err=True) raise typer.Exit(1) - pc = Pinecone(api_key=api_key, source_tag="pinecone_skills:upsert") + pc = Pinecone(api_key=api_key, source_tag="claude_code_plugin:quickstart_upsert") records = [ # Health / feeling unwell