ahang008/ah-skills / skills/ah-gemini-script-polisher
ah-gemini-script-polisher
Verified使用 Gemini 润色或创作中文口播稿,保留作者事实、观点和表达。用于用户要求 Gemini 写口播稿、让 Flash 润色、把 Codex 上下文交给 Gemini 写作、调用口播写作桥,或讨论此桥的架构。普通口播写作未指定 Gemini、通用 Gemini 研究和应用代码架构不触发。
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 3.9 KB |
| SKILL.md | skill md | 6.0 KB |
| agents/openai.yaml | config | 297 B |
| references/01-context-packet.md | markdown | 2.3 KB |
| references/02-browser-bridge.md | markdown | 4.6 KB |
| scripts/check_response.py | script | 3.1 KB |
| tests/test_response.py | script | 2.3 KB |
tests/test_response.py
View on GitHub"""Run the response-boundary regression cases without writing user artifacts."""
import importlib.util
import unittest
from pathlib import Path
SCRIPT = Path(__file__).resolve().parents[1] / "scripts" / "check_response.py"
SPEC = importlib.util.spec_from_file_location("response_checker", SCRIPT)
MODULE = importlib.util.module_from_spec(SPEC)
SPEC.loader.exec_module(MODULE)
VALID = (
"SCRIPT_BEGIN task_id=GSP-test revision=1\n这是一篇完整的口播稿。\n"
"SCRIPT_END task_id=GSP-test revision=1\n修改说明: 未新增事实\n"
"REPLY_DONE task_id=GSP-test revision=1"
)
class ResponseBoundaryTests(unittest.TestCase):
def test_boundary_cases(self):
cases = [
("valid", VALID, {}, True),
("truncated", VALID.rsplit("\n", 1)[0], {}, False),
("stale_task", VALID.replace("GSP-test", "GSP-old"), {}, False),
("wrong_revision", VALID.replace("revision=1", "revision=2"), {}, False),
("duplicate_response", VALID + "\n" + VALID, {}, False),
("empty_script", VALID.replace("这是一篇完整的口播稿。", ""), {}, False),
("too_short", VALID, {"min_chars": 100}, False),
("too_long", VALID, {"max_chars": 5}, False),
("missing_input", "NEEDS_INPUT task_id=GSP-test revision=1\n请补充事实\nREPLY_DONE task_id=GSP-test revision=1", {}, False),
("protocol_in_body", VALID.replace("这是一篇完整的口播稿。", "不要打印 REPLY_DONE"), {}, False),
("extra_after_done", VALID + "\n还有正文", {}, False),
("embedded_second_begin", VALID.replace("这是一篇完整的口播稿。", "这个分工逻辑其实SCRIPT_BEGIN task_id=GSP-test revision=1\n第二个稿件"), {}, False),
]
for name, text, limits, should_pass in cases:
with self.subTest(case=name):
if should_pass:
body, count = MODULE.extract_script(text, "GSP-test", 1, **limits)
self.assertEqual(body, "这是一篇完整的口播稿。")
self.assertEqual(count, len(body))
else:
with self.assertRaises(ValueError):
MODULE.extract_script(text, "GSP-test", 1, **limits)
if __name__ == "__main__":
unittest.main(verbosity=2)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |