用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill agenta-1-prompt-versioning-and-management命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | agenta-1-prompt-versioning-and-management |
| description | Sub-skill of agenta: 1. Prompt Versioning and Management. |
| version | 1.0.0 |
| category | ai-prompting |
| type | reference |
| scripts_exempt | true |
Creating Versioned Prompts:
"""
Create and manage versioned prompts with Agenta.
"""
import agenta as ag
from agenta import Agenta
from typing import Optional, Dict, Any
# Initialize Agenta
ag.init()
@ag.entrypoint
def generate_summary(
text: str,
max_length: int = 100,
style: str = "professional"
) -> str:
"""
Generate a summary with versioned prompt.
Args:
text: Text to summarize
max_length: Maximum summary length
style: Writing style (professional, casual, technical)
Returns:
Generated summary
"""
# Define prompt template (this becomes versioned)
prompt = f"""Summarize the following text in a {style} tone.
Keep the summary under {max_length} words.
Text: {text}
Summary:"""
# Call LLM (Agenta tracks this)
response = ag.llm.complete(
prompt=prompt,
model="gpt-4",
temperature=0.3,
max_tokens=max_length * 2
)
return response.text
# Example usage
text = """
The company reported strong Q3 results with revenue up 25% year-over-year.
Operating margins improved to 18% from 15% in the prior year.
The CEO highlighted expansion into new markets and product launches.
"""
summary = generate_summary(text, max_length=50, style="professional")
print(summary)
Managing Prompt Versions:
"""
Manage multiple prompt versions programmatically.
"""
import agenta as ag
from agenta import Agenta
from dataclasses import dataclass
from typing import List, Dict, Optional
from datetime import datetime
@dataclass
class PromptVersion:
"""Represents a prompt version."""
version_id: str
name: str
template: str
parameters: Dict[str, Any]
created_at: datetime
is_active: bool = False
class PromptManager:
"""
Manage prompt versions with Agenta.
"""
def __init__(self, app_name: str):
self.app_name = app_name
self.client = Agenta()
def create_version(
self,
name: str,
template: str,
parameters: Dict[str, Any] = None
) -> PromptVersion:
"""
Create a new prompt version.
Args:
name: Version name
template: Prompt template
parameters: Default parameters
Returns:
Created PromptVersion
"""
variant = .client.create_variant(
app_name=.app_name,
variant_name=name,
config={
: template,
: parameters {}
}
)
PromptVersion(
version_id=variant.,
name=name,
template=template,
parameters=parameters {},
created_at=datetime.now(),
is_active=
)
() -> [PromptVersion]:
variants = .client.list_variants(app_name=.app_name)
versions = []
v variants:
versions.append(PromptVersion(
version_id=v.,
name=v.name,
template=v.config.get(, ),
parameters=v.config.get(, {}),
created_at=v.created_at,
is_active=v.is_default
))
versions
() -> :
.client.set_default_variant(
app_name=.app_name,
variant_id=version_id
)
() -> PromptVersion:
variant = .client.get_variant(variant_id=version_id)
PromptVersion(
version_id=variant.,
name=variant.name,
template=variant.config.get(, ),
parameters=variant.config.get(, {}),
created_at=variant.created_at,
is_active=variant.is_default
)
() -> [, ]:
results = {}
vid version_ids:
version = .get_version(vid)
*Content truncated — see parent skill full reference.*
Write outbound email and external messages in Vamsee Achanta's voice — a subtle offer to help, never bold or rash claims. Load before drafting ANY email, LinkedIn/Collide reply, proposal note, or outreach sent under his name.
Save/publish analysis or computation results from ANY ecosystem repo to Hugging Face as a queryable, viewer-renderable dataset. Use when the user wants to "save results to hugging face", "publish dataset to HF", "hugging face data saving", "save analysis results", "hf dataset", "make results queryable", or "render via datasets-server API". Reshapes nested results into flat parquet tables, writes a dataset card with a viewer `configs:` block and provenance, applies license/public-vs-private routing, enforces a domain data-quality gate (faithful-to-source != correct), publishes to `aceengineer/<repo>-<projection>`, and verifies via the datasets-server API.
Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.