# Tokei

> Use this skill when the user wants to count lines of code, get code statistics for a project, or analyze code by language.

- Skill: `javimosch/tokei` (Agent Skill)
- Install (CLI): `npx skillmds@latest add javimosch/tokei`
- Raw SKILL.md: https://api.skillmd.com/api/skills/javimosch/tokei/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: javimosch (https://skillmd.com/u/javimosch)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/javimosch/tokei

---


# tokei Plugin

Count your code quickly. Fast code statistics for 150+ languages.

## Commands

### Count
- `tokei count run` — Count code statistics
- `tokei count files` — Count with individual file stats
- `tokei count json` — Output as JSON

## Usage Examples
- "Count lines of code in this directory"
- "Get code statistics as JSON"
- "Show per-file statistics"

## Installation

```bash
cargo install tokei
# or
brew install tokei
```

## Examples

```bash
# Basic count
tokei .

# Count specific path
tokei ./src

# With file details
tokei --files ./src

# JSON output
tokei --output json ./src

# Sort by code lines
tokei --sort code ./src

# Exclude patterns
tokei ./src --exclude *.test.*
```

## Output Columns
- **Files** — number of files
- **Lines** — total lines
- **Code** — lines of code
- **Comments** — lines of comments
- **Blanks** — blank lines

## Key Features
- Supports 150+ languages
- Respects .gitignore
- Multiple output formats (text, JSON, YAML, CBOR)
- Very fast (millions of lines in seconds)
- Accurate multi-line comment handling
