Agent skill

Datacommons Client

by davila7 in davila7/claude-code-templates

Work with Data Commons, a platform providing programmatic access to public statistical data from global sources.

MITAuto-check passedData & Analytics

Install Datacommons Client

skills CLI
$ npx skills add davila7/claude-code-templates --skill datacommons-client -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates datacommons-client --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/scientific/datacommons-client .claude/skills/datacommons-client && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
datacommons-client
GitHub stars
32k
Used in
10 other repos
Token cost
~2k tokens
SKILL.md length
521 words
Files
5 (incl. references)
Skills in repo
477
Repo updated
First seen
Licence
MIT

At a glance

Work with Data Commons, a platform providing programmatic access to public statistical data from global sources.

  • Works in 3 steps: Observation Endpoint - Statistical Data… → Node Endpoint - Knowledge Graph… → Resolve Endpoint - Entity Identification
  • Working with demographic data
  • SKILL.md covers Overview, Installation, Core Capabilities and Typical Workflow, plus 6 more sections
  • Calls uv; reaches datacommons.org and custom.datacommons.org; needs DC_API_KEY

What it does

Datacommons Client is an agent skill from davila7/claude-code-templates. Work with Data Commons, a platform providing programmatic access to public statistical data from global sources. Use this skill when working with demographic data, economic indicators, health statistics, environmental data, or any public datasets available through Data Commons. Applicable for querying population statistics, GDP figures, unemployment rates, disease prevalence, geographic entity resolution, and exploring relationships between statistical entities.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/getting_started.md`, `references/node.md` and `references/observation.md`).

It sits in Data & Analytics, covering Statistics. It works with pandas. The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • Working with demographic data
  • Economic indicators
  • Health statistics
  • Environmental data

Example prompts

  • “/datacommons-client”

Requirements

  • Python 3
  • A credential in DC_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Observation Endpoint - Statistical Data Queries
  2. Node Endpoint - Knowledge Graph Exploration
  3. Resolve Endpoint - Entity Identification

What it can do on your machine

Read from SKILL.md and the folder at commit 14680ec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • datacommons.org
    • custom.datacommons.org

    Also links to:

    • apikeys.datacommons.org
    • docs.datacommons.org
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • DC_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Datacommons Client loads about 2k tokens when it runs, and up to ~9.2k if it reads all its reference files. Until then it costs about 121 tokens; SKILL.md has 521 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~121
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 14680ec, republished under its MIT licence (© davila7). 521 words, ~1,982 tokens.

Download SKILL.mdSave it as .claude/skills/datacommons-client/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
datacommons-client
description
Work with Data Commons, a platform providing programmatic access to public statistical data from global sources. Use this skill when working with demographic data, economic indicators, health statistics, environmental data, or any public datasets available through Data Commons. Applicable for querying population statistics, GDP figures, unemployment rates, disease prevalence, geographic entity resolution, and exploring relationships between statistical entities.

Data Commons Client

Overview

Provides comprehensive access to the Data Commons Python API v2 for querying statistical observations, exploring the knowledge graph, and resolving entity identifiers. Data Commons aggregates data from census bureaus, health organizations, environmental agencies, and other authoritative sources into a unified knowledge graph.

Installation

Install the Data Commons Python client with Pandas support:

bash
uv pip install "datacommons-client[Pandas]"

For basic usage without Pandas:

bash
uv pip install datacommons-client

Core Capabilities

The Data Commons API consists of three main endpoints, each detailed in dedicated reference files:

1. Observation Endpoint - Statistical Data Queries

Query time-series statistical data for entities. See references/observation.md for comprehensive documentation.

Primary use cases:

  • Retrieve population, economic, health, or environmental statistics
  • Access historical time-series data for trend analysis
  • Query data for hierarchies (all counties in a state, all countries in a region)
  • Compare statistics across multiple entities
  • Filter by data source for consistency

Common patterns:

python
from datacommons_client import DataCommonsClient

client = DataCommonsClient()

# Get latest population data
response = client.observation.fetch(
    variable_dcids=["Count_Person"],
    entity_dcids=["geoId/06"],  # California
    date="latest"
)

# Get time series
response = client.observation.fetch(
    variable_dcids=["UnemploymentRate_Person"],
    entity_dcids=["country/USA"],
    date="all"
)

# Query by hierarchy
response = client.observation.fetch(
    variable_dcids=["MedianIncome_Household"],
    entity_expression="geoId/06<-containedInPlace+{typeOf:County}",
    date="2020"
)
2. Node Endpoint - Knowledge Graph Exploration

Explore entity relationships and properties within the knowledge graph. See references/node.md for comprehensive documentation.

Primary use cases:

  • Discover available properties for entities
  • Navigate geographic hierarchies (parent/child relationships)
  • Retrieve entity names and metadata
  • Explore connections between entities
  • List all entity types in the graph

Common patterns:

python
# Discover properties
labels = client.node.fetch_property_labels(
    node_dcids=["geoId/06"],
    out=True
)

# Navigate hierarchy
children = client.node.fetch_place_children(
    node_dcids=["country/USA"]
)

# Get entity names
names = client.node.fetch_entity_names(
    node_dcids=["geoId/06", "geoId/48"]
)
3. Resolve Endpoint - Entity Identification

Translate entity names, coordinates, or external IDs into Data Commons IDs (DCIDs). See references/resolve.md for comprehensive documentation.

Primary use cases:

  • Convert place names to DCIDs for queries
  • Resolve coordinates to places
  • Map Wikidata IDs to Data Commons entities
  • Handle ambiguous entity names

Common patterns:

python
# Resolve by name
response = client.resolve.fetch_dcids_by_name(
    names=["California", "Texas"],
    entity_type="State"
)

# Resolve by coordinates
dcid = client.resolve.fetch_dcid_by_coordinates(
    latitude=37.7749,
    longitude=-122.4194
)

# Resolve Wikidata IDs
response = client.resolve.fetch_dcids_by_wikidata_id(
    wikidata_ids=["Q30", "Q99"]
)

Typical Workflow

Most Data Commons queries follow this pattern:

  1. Resolve entities (if starting with names):

    python
    resolve_response = client.resolve.fetch_dcids_by_name(
        names=["California", "Texas"]
    )
    dcids = [r["candidates"][0]["dcid"]
             for r in resolve_response.to_dict().values()
             if r["candidates"]]
  2. Discover available variables (optional):

    python
    variables = client.observation.fetch_available_statistical_variables(
        entity_dcids=dcids
    )
  3. Query statistical data:

    python
    response = client.observation.fetch(
        variable_dcids=["Count_Person", "UnemploymentRate_Person"],
        entity_dcids=dcids,
        date="latest"
    )
  4. Process results:

    python
    # As dictionary
    data = response.to_dict()
    
    # As Pandas DataFrame
    df = response.to_observations_as_records()

Finding Statistical Variables

Statistical variables use specific naming patterns in Data Commons:

Common variable patterns:

  • Count_Person - Total population
  • Count_Person_Female - Female population
  • UnemploymentRate_Person - Unemployment rate
  • Median_Income_Household - Median household income
  • Count_Death - Death count
  • Median_Age_Person - Median age

Discovery methods:

python
# Check what variables are available for an entity
available = client.observation.fetch_available_statistical_variables(
    entity_dcids=["geoId/06"]
)

# Or explore via the web interface
# https://datacommons.org/tools/statvar
Show full SKILL.md (218 more words)Show less

Working with Pandas

All observation responses integrate with Pandas:

python
response = client.observation.fetch(
    variable_dcids=["Count_Person"],
    entity_dcids=["geoId/06", "geoId/48"],
    date="all"
)

# Convert to DataFrame
df = response.to_observations_as_records()
# Columns: date, entity, variable, value

# Reshape for analysis
pivot = df.pivot_table(
    values='value',
    index='date',
    columns='entity'
)

API Authentication

For datacommons.org (default):

  • An API key is required
  • Set via environment variable: export DC_API_KEY="your_key"
  • Or pass when initializing: client = DataCommonsClient(api_key="your_key")
  • Request keys at: https://apikeys.datacommons.org/

For custom Data Commons instances:

  • No API key required
  • Specify custom endpoint: client = DataCommonsClient(url="https://custom.datacommons.org")

Reference Documentation

Comprehensive documentation for each endpoint is available in the references/ directory:

  • references/observation.md: Complete Observation API documentation with all methods, parameters, response formats, and common use cases
  • references/node.md: Complete Node API documentation for graph exploration, property queries, and hierarchy navigation
  • references/resolve.md: Complete Resolve API documentation for entity identification and DCID resolution
  • references/getting_started.md: Quickstart guide with end-to-end examples and common patterns

Additional Resources

Tips for Effective Use

  1. Always start with resolution: Convert names to DCIDs before querying data
  2. Use relation expressions for hierarchies: Query all children at once instead of individual queries
  3. Check data availability first: Use fetch_available_statistical_variables() to see what's queryable
  4. Leverage Pandas integration: Convert responses to DataFrames for analysis
  5. Cache resolutions: If querying the same entities repeatedly, store name→DCID mappings
  6. Filter by facet for consistency: Use filter_facet_domains to ensure data from the same source
  7. Read reference docs: Each endpoint has extensive documentation in the references/ directory

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in cli-tool/components/skills/scientific/datacommons-client of davila7/claude-code-templates.

  • SKILL.md
  • references/getting_started.md
  • references/node.md
  • references/observation.md
  • references/resolve.md

Open the folder on GitHubat commit 14680ec

Used in 10 other repositories

We found 12 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 10 other GitHub owners. This page covers the copy in davila7/claude-code-templates, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Datacommons Client next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Datacommons Client compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Datacommons Client this skilldavila7/claude-code-templates32k10 repos~2kAutomated safety check: PassMIT
Statistical Data Analysislingzhi227/agent-research-skills384—~886Automated safety check: PassNone
Q-EDA Exploratory AnalysisTyrealQ/q-skills108—~1.1kAutomated safety check: PassMIT
Data Explorerliangdabiao/claude-data-analysis-ultra-main290—~2.1kAutomated safety check: PassNone
Data AnalystRightNow-AI/openfang18k—~730Automated safety check: PassApache-2.0
Analyzing API Gateway Access Logsmukul975/Anthropic-Cybersecurity-Skills34k—~581Automated safety check: PassApache-2.0

Similar skills

  • Statistical Data Analysis

    lingzhi227/agent-research-skills

    Writes statistical analysis code for experimental data, runs it through a four-round review, and reports effect sizes, p-values and confidence intervals.

    384 GitHub stars~886 tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Runs exploratory data analysis on tabular data after you confirm each column's measurement level, then writes CSV tables and a narrative summary.

    108 GitHub stars~1.1k tokensUpdated 15 days ago
    Data & AnalyticsAuto-check passed
  • Data Explorer

    liangdabiao/claude-data-analysis-ultra-main

    Performs exploratory data analysis, statistical analysis, and pattern discovery.

    290 GitHub stars~2.1k tokensUpdated 5 mo ago
    Data & AnalyticsAuto-check passed
  • Data Analyst

    RightNow-AI/openfang

    Data analysis expert for statistics, visualization, pandas, and exploration

    18k GitHub stars~730 tokensUpdated 3 mo ago
    Data & AnalyticsAuto-check passed
  • Analyzing API Gateway Access Logs

    mukul975/Anthropic-Cybersecurity-Skills

    Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect BOLA/IDOR attacks, rate limit bypass, credential scanning, and injection attempts.

    34k GitHub stars~581 tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Detecting Beaconing Patterns With Zeek

    mukul975/Anthropic-Cybersecurity-Skills

    Performs statistical analysis of Zeek conn.log connection intervals to detect C2 beaconing patterns.

    34k GitHub stars~662 tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed

More from davila7/claude-code-templates

All 477 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 10 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Works with

Questions about Datacommons Client

What does Datacommons Client do?

Work with Data Commons, a platform providing programmatic access to public statistical data from global sources. Datacommons Client is an agent skill from davila7/claude-code-templates. Work with Data Commons, a platform providing programmatic access to public statistical data from global sources.

When should I use Datacommons Client?

Datacommons Client fits situations like: working with demographic data; economic indicators; health statistics; environmental data.

How do I install Datacommons Client in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill datacommons-client -a claude-code`. Or copy the skill folder (cli-tool/components/skills/scientific/datacommons-client in davila7/claude-code-templates) into .claude/skills/datacommons-client in your project. Claude Code loads it when a task matches its description.

How do I install Datacommons Client in Codex?

Run `npx skills add davila7/claude-code-templates --skill datacommons-client -a codex`. Or copy the skill folder (cli-tool/components/skills/scientific/datacommons-client in davila7/claude-code-templates) into .agents/skills/datacommons-client in your project. Codex loads it when a task matches its description.

Can I use Datacommons Client in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill datacommons-client -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/datacommons-client, .gemini/skills/datacommons-client, .github/skills/datacommons-client and .opencode/skills/datacommons-client in your project.

What does Datacommons Client need to run?

Going by SKILL.md and its folder, Datacommons Client needs the command-line tools its instructions call (uv) and credentials named DC_API_KEY. Our summary lists: Python 3; A credential in DC_API_KEY.

Does Datacommons Client access the network?

SKILL.md names 5 domains. In commands or code: datacommons.org and custom.datacommons.org; the agent is likely to contact these when it follows the instructions. As links in the text: apikeys.datacommons.org, docs.datacommons.org and github.com. This is read from the text; nothing was executed.

Is Datacommons Client safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Datacommons Client use?

Datacommons Client is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Datacommons Client use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.2k tokens, read only when the agent opens those files.

What are the alternatives to Datacommons Client?

Skills that share tags, products or a category with Datacommons Client: Statistical Data Analysis (lingzhi227/agent-research-skills, 384 stars), Q-EDA Exploratory Analysis (TyrealQ/q-skills, 108 stars), Data Explorer (liangdabiao/claude-data-analysis-ultra-main, 290 stars) and Data Analyst (RightNow-AI/openfang, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Datacommons Client?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,463 GitHub stars. The repository holds 477 skills in this directory. The repository was last updated on October 8, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.