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.
npx skills add Mindrally/skills --skill nlp-natural-language-processing -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/nlp-natural-language-processing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/nlp-natural-language-processing/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill nlp-natural-language-processing -a codex2Manually: put the files in place
.agents/skills/nlp-natural-language-processing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill nlp-natural-language-processing -a cursor2Manually: put the files in place
.cursor/skills/nlp-natural-language-processing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills nlp-natural-language-processing2Manually: put the files in place
.github/skills/nlp-natural-language-processing/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill nlp-natural-language-processing -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path nlp-natural-language-processingManually: put the files in place
.devin/skills/nlp-natural-language-processing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill nlp-natural-language-processing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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