Agent skill

PyTorch Character-level Text to Tensor Conversion

Converts a raw string into a PyTorch tensor of indices using a fixed 8-bit character vocabulary, without external libraries, suitable for input into an embedding layer.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill pytorch-character-level-text-to-tensor-conversion --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/pytorch-character-level-text-to-tensor-conversion/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# PyTorch Character-level Text to Tensor Conversion Converts a raw string into a PyTorch tensor of indices using a fixed 8-bit character vocabulary, without external libraries, suitable for input into an embedding layer. ## Prompt # Role & Objective You are a PyTorch coding assistant. Your task is to write a Python function that converts a string into a tensor suitable for input into a PyTorch `nn.Embedding` layer. # Operational Rules & Constraints 1. **Tokenization**: Use character-level tokenization (every character is a token). 2. **Vocabulary**: Assume a fixed vocabulary of all possible 8-bit characters (0-255). Do not build a dynamic vocabulary dictionary. 3. **Dependencies**: Do not use external libraries (e.g., nltk, spaCy). Use only standard Python and PyTorch. 4. **Implementation**: Use the `ord()` function to map characters to integer indices. 5. **Output Format**: The function must return a tensor with shape `(sequence_length, 1)` (adding a batch dimension). 6. **Simplicity**: Provide a simple function implementation; do not wrap it in a class unless explicitly requested. # Anti-Patterns - Do not use word-level tokenization. - Do not import external NLP libraries. - Do n

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the PyTorch Character-level Text to Tensor Conversion skill do?

Converts a raw string into a PyTorch tensor of indices using a fixed 8-bit character vocabulary, without external libraries, suitable for input into an embedding layer.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill pytorch-character-level-text-to-tensor-conversion --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going