Skip to main content
skill CX Codex

nlp-natural-language-processing — Claude Code skill: how to install

Technical guidelines for natural language processing tasks using transformers, spaCy, and NLTK. Guides agents on proper tokenization, entity extraction, and vector search.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill nlp-natural-language-processing -a claude-code
Open on GitHub

What nlp-natural-language-processing does

This skill guides your coding assistant through natural language workflows in Python. It enforces rules for text preprocessing, tokenizers like SentencePiece or WordPiece, and special tokens such as [CLS] and [SEP]. The prompt instructs the assistant to follow functional patterns and maintain stratified splits when training BERT or RoBERTa classifiers.

It outlines practices for key tasks. These include entity recognition with spaCy and vector lookups with sentence-transformers and FAISS. For production deployments, it specifies inference tuning via model quantization or ONNX Runtime.

Your environment must have Python dependencies installed, specifically torch, transformers, and spacy. The skill strictly requires declaring maximum sequence lengths to prevent silent truncation bugs.

What it helps with

  • configure text tokenization with attention masks
  • build custom entity extraction pipelines in spaCy
  • implement vector similarity search with FAISS
  • prepare model quantization or ONNX deployment

Example prompts for the agent

  • Build a text classification pipeline for RoBERTa with stratified validation splits.
  • Set up a custom spaCy NER component using BILOU tagging for legal entities.
  • Implement semantic document search using sentence-transformers and an Annoy index.

How to install nlp-natural-language-processing

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill nlp-natural-language-processing -a claude-code

2Manually: put the files in place

~/.claude/skills/nlp-natural-language-processing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/nlp-natural-language-processing/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about nlp-natural-language-processing

How do I install nlp-natural-language-processing in Claude Code?

Run npx skills add Mindrally/skills --skill nlp-natural-language-processing -a claude-code. The file will be placed at ~/.claude/skills/nlp-natural-language-processing/SKILL.md.

What does nlp-natural-language-processing do?

It provides system instructions for developing NLP pipelines in Python. It steers the AI toward proper tokenization schemes, padding strategies, and PEP 8 standards.

What Python packages are expected by this skill?

The skill relies on transformers, torch, spacy, nltk, sentence-transformers, tokenizers, datasets, and evaluate.

Source text

SKILL.md · Apache-2.0
---
name: nlp-natural-language-processing
description: Expert guidance for natural language processing development using transformers, spaCy, NLTK, and modern NLP techniques.
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Natural Language Processing (NLP) Development

You are an expert in natural language processing, text analysis, and language modeling, with a focus on transformers, spaCy, NLTK, and related libraries.

## Key Principles

- Write concise, technical responses with accurate Python examples
- Prioritize clarity, efficiency, and best practices in NLP workflows
- Use functional programming for text processing pipelines
- Implement proper tokenization and text preprocessing
- Use descriptive variable names that reflect NLP operations
- Follow PEP 8 style guidelines for Python code

## Text Preprocessing

- Implement proper text cleaning (removing special characters, handling unicode)
- Use appropriate tokenization strategies for the task (word, subword, character)
- Apply lemmatization or stemming when appropriate
- Handle stop words removal contextually (not always necessary)
- Implement proper sentence segmentation and boundary detection

## Tokenization and Encoding

- Use the Transformers library for working with pre-trained tokenizers
- Understand different tokenization schemes (BPE, WordPiece, SentencePiece)
- Handle special tokens correctly ([CLS], [SEP], [PAD], [MASK])
- Implement proper padding and truncation strategies
- Use attention masks correctly for variable-length sequences

## Text Classification

- Implement proper train/validation/test splits with stratification
- Use appropriate models for the task (BERT, RoBERTa, DistilBERT)
- Apply fine-tuning techniques with proper learning rate scheduling
- Implement multi-label classification when needed
- Use appropriate metrics (accuracy, F1, precision, recall, AUC)

## Named Entity Recognition (NER)

- Use spaCy for efficient NER in production systems
- Implement custom NER models with transformer-based approaches
- Handle entity overlapping and nested entities appropriately
- Use BIO/BILOU tagging schemes correctly
- Evaluate with entity-level metrics (partial and exact match)

## Text Generation

- Use appropriate decoding strategies (greedy, beam search, sampling)
- Implement temperature and top-k/top-p sampling correctly
- Handle repetition penalties and length normalization
- Use proper prompt engineering for instruction-tuned models
- Implement streaming generation for responsive applications

## Embeddings and Semantic Search

- Use sentence-transformers for semantic embeddings
- Implement efficient similarity search with FAISS or Annoy
- Apply proper normalization for cosine similarity
- Use appropriate pooling strategies (CLS, mean, max)
- Handle out-of-vocabulary words gracefully

## Sequence-to-Sequence Tasks

- Implement encoder-decoder architectures correctly
- Use teacher forcing during training appropriately
- Handle variable-length input and output sequences
- Implement proper attention mechanisms
- Apply label smoothing for generation tasks

## Performance Optimization

- Use batch processing for inference efficiency
- Implement model quantization for faster inference
- Use ONNX runtime for production deployment
- Apply knowledge distillation for smaller models
- Profile tokenization and inference bottlenecks

## Error Handling and Validation

- Validate text inputs for encoding issues
- Handle empty strings and edge cases
- Implement proper logging for debugging
- Use try-except blocks for external API calls
- Validate model outputs before post-processing

## Dependencies

- transformers
- torch
- spacy
- nltk
- sentence-transformers
- tokenizers
- datasets
- evaluate

## Key Conventions

1. Always specify the model's maximum sequence length
2. Use appropriate padding strategies (longest, max_length)
3. Handle special characters and encoding issues early
4. Document expected input/output formats clearly
5. Use consistent preprocessing across training and inference
6. Implement proper batching for production systems

Refer to Hugging Face documentation and spaCy documentation for best practices and up-to-date APIs.

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

Everything for AI and ML →

From the same set214

drizzle-orm A skill that gives your agent Drizzle ORM conventions: schema as code, inferred types, queries and migrations. CX Codex +1 1,000installs elasticsearch-best-practices Provides rules and code patterns for Elasticsearch index mappings, shard planning, and search query optimization directly to your agent. CX Codex +1 999installs numpy-best-practices A skill that gives your agent NumPy ground rules: vectorize instead of looping, pick dtypes, watch memory, use np.linalg. Useful whenever Python code crunches numbers. CX Codex +1 997installs python This skill tells your coding agent how to write Python: PEP 8, type hints, early returns, async for I/O. Useful when the agent edits or generates code in a Python repo. CX Codex +1 983installs ui-design Gives the agent a checklist for interfaces: accessibility, responsive layout, performance. Useful when it writes or reviews frontend code. CX Codex +1 981installs internationalization-i18n This skill gives the agent a rulebook for internationalization: translations, locale-aware dates and numbers, RTL layout. Useful when an app ships in more than one language. CX Codex +1 978installs java A skill that tells the agent how to write Java: layered structure, Spring Boot 3.x, JUnit and Mockito tests. Useful when a Java codebase needs one consistent style. CX Codex +1 966installs zustand-state-management Enforces Zustand store best practices in React and TypeScript apps, covering store slices, SSR, and testing. It helps eliminate selector re-renders and hydration bugs. CX Codex +1 959installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor