スキル一覧に戻る
EladAriel

context-compressor

by EladAriel

The Pseudo-Code Prompting Plugin enhances Claude Code with automated conversion, validation, and optimization of natural language requirements into concise, function-like pseudo-code. This structured approach eliminates ambiguity, ensures completeness, and accelerates development.

2🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: context-compressor description: Compress verbose text into token-efficient pseudo-code allowed-tools: Read model: sonnet

Context Compressor

Convert verbose requirements into concise pseudo-code format.

WHAT THIS DOES

Transforms long-winded descriptions into compact function-call syntax:

Before (150 tokens):
"We need to build a user authentication system. It should support
multiple providers like Google and GitHub. Users should be able
to sign in with OAuth. We need JWT tokens that expire after 1 hour.
Also add refresh token support. Make sure passwords are hashed."

After (35 tokens):
implement_auth(
  type="oauth",
  providers=["google", "github"],
  tokens={"type": "jwt", "expiry": "1h", "refresh": true},
  password_hashing="bcrypt"
)

Compression: 76% reduction

COMPRESSION RULES

Rule 1: Extract Actions → Function Names

"Build a REST API" → build_rest_api(...)
"Add user authentication" → add_authentication(...)
"Implement caching" → implement_caching(...)

Rule 2: Extract Details → Parameters

"Support Google and GitHub" → providers=["google", "github"]
"Expire after 1 hour" → expiry="1h"
"Use Redis for caching" → cache_type="redis"
"JWT tokens that expire after 1 hour with refresh support"
→ tokens={"type": "jwt", "expiry": "1h", "refresh": true}

Rule 4: Remove Filler Words

Remove: "we need to", "should", "make sure", "also", "it would be nice"

OUTPUT FORMAT

# Compressed Pseudo-Code

[function_call]

## Compression Stats

Original: [N] tokens
Compressed: [N] tokens
Reduction: [N]% ([N] tokens saved)

EXAMPLE

Input (Verbose)

We're building a task management application. Users should be able
to create, read, update, and delete tasks. Each task has a title,
description, due date, and priority level. We need to implement
user authentication so only logged-in users can access their tasks.
Use JWT tokens for authentication. The API should be RESTful with
proper HTTP status codes. We also need to add input validation to
make sure task titles aren't empty and due dates are in the future.
Error messages should be user-friendly. Oh, and we should add rate
limiting to prevent abuse.

(125 tokens)

Output (Compressed)

# Compressed Pseudo-Code

build_task_management_app(
  features=["crud"],
  task_schema={
    "title": "string:required",
    "description": "string:optional",
    "due_date": "datetime:required",
    "priority": "enum:[low,medium,high]"
  },
  auth={
    "type": "jwt",
    "required": true
  },
  api={
    "type": "rest",
    "status_codes": "standard"
  },
  validation={
    "title": "not_empty",
    "due_date": "future_only"
  },
  error_handling="user_friendly_messages",
  rate_limiting="enabled"
)

## Compression Stats

Original: 125 tokens
Compressed: 68 tokens
Reduction: 46% (57 tokens saved)

WHEN TO USE

Use compression when:

  • User provides long descriptions
  • Requirements are buried in prose
  • Context window is filling up
  • Need to summarize progress
  • Documenting decisions compactly

QUICK RULES

  1. Preserve all semantic information
  2. Remove filler words and phrases
  3. Group related parameters into objects
  4. Use abbreviations (auth, API, DB) where clear
  5. Show compression stats (tokens saved)

VERSION

2.0.0 - Simplified (280 → 150 lines)

スコア

総合スコア

70/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です