Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Engineering Nba Data

ASecurity

Extracts, transforms, and analyzes NBA statistics using the nba_api Python library. Use when working with NBA player stats, team data, game logs, shot charts, league statistics, or any NBA-related data engineering tasks. Supports both stats.nba.com endpoints and static player/team lookups.

416 stars
0 votes
0 copies
2 views
Added 2/7/2026
datapythongosqlapidatabasedocumentation

Works with

api

Security Analysis

A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Scanned 2/12/2026

Install to Claude Code

$npx -y skills add aiskillstore/marketplace --skill engineering-nba-data --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Engineering Nba Data?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Engineering Nba Data
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-engineering-nba-data/badge)](https://www.skillsdirectory.com/skills/aiskillstore-engineering-nba-data)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: engineering-nba-data
description: Extracts, transforms, and analyzes NBA statistics using the nba_api Python library. Use when working with NBA player stats, team data, game logs, shot charts, league statistics, or any NBA-related data engineering tasks. Supports both stats.nba.com endpoints and static player/team lookups.
---

**Goal**: Extract and process NBA statistical data efficiently using the nba_api library for data analysis, reporting, and application development.

**IMPORTANT**: The nba_api library accesses stats.nba.com endpoints. All data requests return structured datasets that can be output as JSON, dictionaries, or pandas DataFrames.

## Workflow

### Phase 1: Setup and Installation

- Install nba_api: `pip install nba_api` if not yet installed
- Import required modules based on task:
  - `from nba_api.stats.endpoints import [endpoint_name]` for stats.nba.com data
  - `from nba_api.stats.static import players, teams` for static lookups
  - `from nba_api.stats.library.parameters import [parameter_classes]` for valid parameter values

### Phase 2: Data Retrieval

**For Player/Team Lookups (No API Calls)**:

- Use `players.find_players_by_full_name('player_name')` for player searches
- Use `teams.find_teams_by_full_name('team_name')` for team searches
- Both return dictionaries with `id`, `full_name`, and other metadata
- No HTTP requests are sent; data is embedded in the package

**For Stats Endpoints (API Calls)**:

- Identify the correct endpoint from [table of contents](docs/table_of_contents.md)
- Initialize endpoint with required parameters: `endpoint_class(param1=value1, param2=value2)`
- Access datasets using dot notation: `response_object.dataset_name`
- Retrieve data in desired format:
  - `.get_json()` for JSON string
  - `.get_dict()` for dictionary
  - `.get_data_frame()` for pandas DataFrame

**Custom Request Configuration**:

- Set custom headers: `endpoint_class(player_id=123, headers=custom_headers)`
- Set proxy: `endpoint_class(player_id=123, proxy='127.0.0.1:80')`
- Set timeout: `endpoint_class(player_id=123, timeout=100)` (in seconds)

### Phase 3: Data Processing

- Extract specific datasets from endpoint responses
- Transform data using pandas for aggregations, filtering, joins
- Normalize nested data structures as needed
- Handle multiple datasets returned by single endpoint

### Phase 4: Output and Storage

- Export to CSV: `df.to_csv('output.csv', index=False)`
- Export to JSON: Use `.get_json()` or `df.to_json()`
- Store in database using pandas `.to_sql()` method
- Cache responses to minimize API calls

## Rules

- **Required packages**: `nba_api` must be installed before use
- **Static first**: Always use static lookups (players/teams) for ID retrieval before making API calls
- **Parameter validation**: Reference [parameters.md](docs/nba_api/stats/library/parameters.md) for valid parameter values
- **Endpoint selection**: Check [table of contents](docs/table_of_contents.md) to find the correct endpoint
- **Rate limiting**: Be mindful of API rate limits; cache data when possible
- **Error handling**: Wrap API calls in try-except blocks to handle network failures
- **Data formats**: Know when to use JSON, dict, or DataFrame based on downstream requirements
- **Season format**: Seasons use format `YYYY-YY` (e.g., `2019-20`)
- **League IDs**: NBA=`00`, ABA=`01`, WNBA=`10`, G-League=`20`

## Acceptance Criteria

- Data retrieved successfully from appropriate endpoint or static source
- Correct parameters used based on documentation
- Data formatted appropriately for intended use case
- Error handling implemented for API failures
- Code follows Python best practices
- Results validated against expected structure
- Documentation references included where relevant

## Reference Documentation

**Quick access to common resources**:

- [Table of Contents](docs/table_of_contents.md) - Full documentation index
- [Examples](docs/nba_api/stats/examples.md) - Usage examples for endpoints and static data
- [Parameters](docs/nba_api/stats/library/parameters.md) - Valid parameter values and patterns
- [Endpoints Data Structure](docs/nba_api/stats/endpoints_data_structure.md) - Response format and methods
- [Players](docs/nba_api/stats/static/players.md) - Static player lookup functions
- [Teams](docs/nba_api/stats/static/teams.md) - Static team lookup functions
- [HTTP Library](docs/nba_api/library/http.md) - HTTP request details

**Endpoint-specific documentation**:

Refer to `docs/nba_api/stats/endpoints/[endpoint_name].md` for detailed parameter and dataset information for each endpoint.

Attribution

aiskillstoreaiskillstore
View sourceMore from aiskillstore →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Rank Tracker

This skill helps you track, analyze, and report on keyword ranking positions over time. It monitors both traditional SERP rankings and AI/GEO visibility to provide comprehensive search performance insights.

1821 votes

Youtube Competitor Analyzer

Find and analyze YouTube competitor channels using YouTube Data API v3. Discover competitors through keyword search, category matching, content similarity, and related channel discovery. Compare metrics, content strategies, and market positioning. Use when users want to (1) Find competitors for their YouTube channel, (2) Analyze competitor performance metrics, (3) Compare their channel against competitors, (4) Identify content gaps and opportunities, (5) Benchmark against similar creators, (6...

31 votes

Twitter Algorithm Optimizer

Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.

742580 votes

Weather Fetcher

Instructions for fetching current weather temperature data for Karachi, Pakistan from wttr.in API

655280 votes

Weather

Get current weather and forecasts (no API key required).

476190 votes
View all in data →