omni-captions-skills 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- omni_captions_skills-0.1.0/.claude-plugin/marketplace.json +26 -0
- omni_captions_skills-0.1.0/.claude-plugin/plugin.json +10 -0
- omni_captions_skills-0.1.0/.github/workflows/publish.yml +65 -0
- omni_captions_skills-0.1.0/.github/workflows/skills-install.yml +95 -0
- omni_captions_skills-0.1.0/.github/workflows/test.yml +46 -0
- omni_captions_skills-0.1.0/.gitignore +212 -0
- omni_captions_skills-0.1.0/CLAUDE.md +159 -0
- omni_captions_skills-0.1.0/LICENSE +21 -0
- omni_captions_skills-0.1.0/PKG-INFO +130 -0
- omni_captions_skills-0.1.0/README.md +100 -0
- omni_captions_skills-0.1.0/README_zh.md +100 -0
- omni_captions_skills-0.1.0/build.sh +24 -0
- omni_captions_skills-0.1.0/packages/lattifai-1.2.2.tar.gz +0 -0
- omni_captions_skills-0.1.0/packages/lattifai_captions-0.1.0.tar.gz +0 -0
- omni_captions_skills-0.1.0/packages/lattifai_core-0.6.1.tar.gz +0 -0
- omni_captions_skills-0.1.0/packages/omnicaptions-0.1.0.tar.gz +0 -0
- omni_captions_skills-0.1.0/pyproject.toml +62 -0
- omni_captions_skills-0.1.0/skills/omnicaptions-LaiCut/SKILL.md +176 -0
- omni_captions_skills-0.1.0/skills/omnicaptions-convert/SKILL.md +227 -0
- omni_captions_skills-0.1.0/skills/omnicaptions-download/SKILL.md +133 -0
- omni_captions_skills-0.1.0/skills/omnicaptions-transcribe/SKILL.md +166 -0
- omni_captions_skills-0.1.0/skills/omnicaptions-translate/SKILL.md +290 -0
- omni_captions_skills-0.1.0/src/omnicaptions/__init__.py +51 -0
- omni_captions_skills-0.1.0/src/omnicaptions/__main__.py +6 -0
- omni_captions_skills-0.1.0/src/omnicaptions/caption.py +654 -0
- omni_captions_skills-0.1.0/src/omnicaptions/cli.py +911 -0
- omni_captions_skills-0.1.0/src/omnicaptions/config.py +136 -0
- omni_captions_skills-0.1.0/src/omnicaptions/prompts/transcription_dotey.md +107 -0
- omni_captions_skills-0.1.0/tests/data/SA1.mp3 +0 -0
- omni_captions_skills-0.1.0/tests/data/SA1.vtt +5 -0
- omni_captions_skills-0.1.0/tests/data/karaoke_test.json +22 -0
- omni_captions_skills-0.1.0/tests/test_cli_convert.py +641 -0
- omni_captions_skills-0.1.0/tests/test_cli_entrypoint.py +130 -0
- omni_captions_skills-0.1.0/tests/test_import.py +54 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "omni-captions-skills",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "LattifAI",
|
|
5
|
+
"email": "tech@lattifai.com"
|
|
6
|
+
},
|
|
7
|
+
"metadata": {
|
|
8
|
+
"description": "AI-powered media transcription, translation, caption conversion, and audio-text alignment",
|
|
9
|
+
"version": "0.1.0"
|
|
10
|
+
},
|
|
11
|
+
"plugins": [
|
|
12
|
+
{
|
|
13
|
+
"name": "omnicaptions",
|
|
14
|
+
"source": {
|
|
15
|
+
"source": "github",
|
|
16
|
+
"repo": "lattifai/omni-captions-skills"
|
|
17
|
+
},
|
|
18
|
+
"description": "Transcribe, translate, convert, and align captions using AI APIs",
|
|
19
|
+
"version": "0.1.0",
|
|
20
|
+
"keywords": ["transcription", "gemini", "youtube", "captions", "translation", "caption", "alignment", "lattifai"],
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"category": "media",
|
|
23
|
+
"strict": true
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "omnicaptions",
|
|
3
|
+
"description": "AI-powered media transcription, translation, and caption format conversion",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "LattifAI"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://github.com/lattifai/omni-captions-skills",
|
|
9
|
+
"license": "MIT"
|
|
10
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
tag:
|
|
10
|
+
description: 'Tag to publish (e.g. v0.1.6)'
|
|
11
|
+
required: true
|
|
12
|
+
type: string
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build_and_publish:
|
|
16
|
+
name: Build source distribution and publish
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
environment: pypi
|
|
19
|
+
permissions:
|
|
20
|
+
id-token: write
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
with:
|
|
25
|
+
ref: ${{ inputs.tag || github.ref }}
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.10'
|
|
31
|
+
|
|
32
|
+
- name: Install build dependencies
|
|
33
|
+
run: |
|
|
34
|
+
python -m pip install --upgrade pip setuptools build
|
|
35
|
+
|
|
36
|
+
- name: Build source distribution
|
|
37
|
+
run: |
|
|
38
|
+
python -m build --sdist
|
|
39
|
+
|
|
40
|
+
- name: Verify source distribution
|
|
41
|
+
run: |
|
|
42
|
+
echo "📦 Source distribution created:"
|
|
43
|
+
ls -lah dist/
|
|
44
|
+
|
|
45
|
+
echo ""
|
|
46
|
+
echo "📋 Distribution details:"
|
|
47
|
+
for sdist in dist/*.tar.gz; do
|
|
48
|
+
echo " ✓ $(basename $sdist)"
|
|
49
|
+
done
|
|
50
|
+
|
|
51
|
+
- name: Publish to PyPI
|
|
52
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
53
|
+
with:
|
|
54
|
+
verbose: true
|
|
55
|
+
|
|
56
|
+
- name: Publication summary
|
|
57
|
+
run: |
|
|
58
|
+
echo "✅ Successfully published to PyPI"
|
|
59
|
+
echo ""
|
|
60
|
+
echo "📦 Published distribution:"
|
|
61
|
+
for sdist in dist/*.tar.gz; do
|
|
62
|
+
echo " ✓ $(basename $sdist)"
|
|
63
|
+
done
|
|
64
|
+
echo ""
|
|
65
|
+
echo "🏷️ Tag: ${{ github.ref_name }}"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Skills Install
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, dev]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, dev]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test-skills-install:
|
|
11
|
+
runs-on: macos-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
node-version: ["20", "22"]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: ${{ matrix.node-version }}
|
|
21
|
+
|
|
22
|
+
- name: List available skills
|
|
23
|
+
run: npx -y add-skill ${{ github.repository }} -l
|
|
24
|
+
|
|
25
|
+
- name: Install all skills (global, non-interactive)
|
|
26
|
+
run: npx -y add-skill ${{ github.repository }} -g -a claude-code -y
|
|
27
|
+
|
|
28
|
+
- name: Verify skills installed
|
|
29
|
+
run: |
|
|
30
|
+
echo "Checking ~/.claude/skills directory..."
|
|
31
|
+
ls -la ~/.claude/skills/ || echo "No skills directory found"
|
|
32
|
+
|
|
33
|
+
# Check for expected skill directories
|
|
34
|
+
for skill in transcribe translate convert download LaiCut; do
|
|
35
|
+
if [ -d ~/.claude/skills/omnicaptions-$skill ]; then
|
|
36
|
+
echo "✓ omnicaptions-$skill installed"
|
|
37
|
+
ls ~/.claude/skills/omnicaptions-$skill/
|
|
38
|
+
else
|
|
39
|
+
echo "✗ omnicaptions-$skill NOT found"
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
done
|
|
43
|
+
|
|
44
|
+
- name: Verify SKILL.md files
|
|
45
|
+
run: |
|
|
46
|
+
for skill in transcribe translate convert download LaiCut; do
|
|
47
|
+
if [ -f ~/.claude/skills/omnicaptions-$skill/SKILL.md ]; then
|
|
48
|
+
echo "✓ omnicaptions-$skill/SKILL.md exists"
|
|
49
|
+
else
|
|
50
|
+
echo "✗ omnicaptions-$skill/SKILL.md NOT found"
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
done
|
|
54
|
+
echo "All SKILL.md files verified!"
|
|
55
|
+
|
|
56
|
+
test-plugin-structure:
|
|
57
|
+
runs-on: macos-latest
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
|
|
61
|
+
- name: Verify plugin.json exists
|
|
62
|
+
run: |
|
|
63
|
+
if [ -f .claude-plugin/plugin.json ]; then
|
|
64
|
+
echo "✓ .claude-plugin/plugin.json exists"
|
|
65
|
+
cat .claude-plugin/plugin.json
|
|
66
|
+
else
|
|
67
|
+
echo "✗ .claude-plugin/plugin.json NOT found"
|
|
68
|
+
exit 1
|
|
69
|
+
fi
|
|
70
|
+
|
|
71
|
+
- name: Verify skills directory structure
|
|
72
|
+
run: |
|
|
73
|
+
echo "Skills directory structure:"
|
|
74
|
+
find skills -name "SKILL.md" -type f | while read f; do
|
|
75
|
+
echo "✓ $f"
|
|
76
|
+
done
|
|
77
|
+
|
|
78
|
+
- name: Validate plugin.json schema
|
|
79
|
+
run: |
|
|
80
|
+
node -e "
|
|
81
|
+
const fs = require('fs');
|
|
82
|
+
const plugin = JSON.parse(fs.readFileSync('.claude-plugin/plugin.json', 'utf8'));
|
|
83
|
+
|
|
84
|
+
const required = ['name', 'description', 'version'];
|
|
85
|
+
const missing = required.filter(f => !plugin[f]);
|
|
86
|
+
|
|
87
|
+
if (missing.length > 0) {
|
|
88
|
+
console.error('Missing required fields:', missing);
|
|
89
|
+
process.exit(1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
console.log('✓ plugin.json is valid');
|
|
93
|
+
console.log(' name:', plugin.name);
|
|
94
|
+
console.log(' version:', plugin.version);
|
|
95
|
+
"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, dev]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, dev]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
- name: Install ruff
|
|
18
|
+
run: pip install ruff
|
|
19
|
+
- name: Lint
|
|
20
|
+
run: ruff check src/
|
|
21
|
+
|
|
22
|
+
test:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
python-version: ["3.10", "3.12"]
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: ${{ matrix.python-version }}
|
|
32
|
+
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
pip install --upgrade pip
|
|
36
|
+
pip install -e ".[all]"
|
|
37
|
+
|
|
38
|
+
- name: Test CLI entry point
|
|
39
|
+
run: |
|
|
40
|
+
python -m omnicaptions --help
|
|
41
|
+
omnicaptions --help
|
|
42
|
+
# test LaiCut
|
|
43
|
+
lai alignment align tests/data/SA1.mp3 tests/data/SA1.vtt tests/data/SA1_LaiCut.vtt
|
|
44
|
+
|
|
45
|
+
- name: Run tests
|
|
46
|
+
run: pytest tests/ -v
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
|
|
209
|
+
# Git worktrees
|
|
210
|
+
.worktrees/
|
|
211
|
+
|
|
212
|
+
.DS_Store
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
Guidance for Claude Code when working with this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
**omni-captions-skills** - Claude Code plugin for media transcription and caption translation using AI APIs.
|
|
8
|
+
|
|
9
|
+
## Structure
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
omni-captions-skills/
|
|
13
|
+
├── .claude-plugin/
|
|
14
|
+
│ ├── plugin.json # Plugin manifest (required)
|
|
15
|
+
│ └── marketplace.json # Marketplace distribution
|
|
16
|
+
├── skills/
|
|
17
|
+
│ ├── omnicaptions-transcribe/SKILL.md
|
|
18
|
+
│ ├── omnicaptions-convert/SKILL.md
|
|
19
|
+
│ ├── omnicaptions-translate/SKILL.md
|
|
20
|
+
│ ├── omnicaptions-download/SKILL.md
|
|
21
|
+
│ └── omnicaptions-LaiCut/SKILL.md
|
|
22
|
+
├── src/omnicaptions/
|
|
23
|
+
│ ├── __init__.py # Exports
|
|
24
|
+
│ ├── caption.py # GeminiCaption class
|
|
25
|
+
│ ├── cli.py # CLI entry point
|
|
26
|
+
│ ├── config.py # API key management
|
|
27
|
+
│ └── prompts/
|
|
28
|
+
│ └── transcription_dotey.md
|
|
29
|
+
└── pyproject.toml
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Key Classes
|
|
33
|
+
|
|
34
|
+
- `GeminiCaption`: Main class with `transcribe()` and `translate()` methods
|
|
35
|
+
- `GeminiCaptionConfig`: Configuration dataclass
|
|
36
|
+
- From `lattifai-captions`: `Caption`, `GeminiReader`, `GeminiWriter`
|
|
37
|
+
- From `lattifai`: `LattifAI` client for forced alignment (via `omnicaptions[alignment]`)
|
|
38
|
+
|
|
39
|
+
## CLI
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# All commands support -o for output file/directory (optional, defaults to input dir)
|
|
43
|
+
omnicaptions transcribe <input> [-o output] [-m model] [-l lang] [-t lang --bilingual]
|
|
44
|
+
omnicaptions convert <input> [-o output] [-f fmt] [-t fmt]
|
|
45
|
+
omnicaptions translate <input> [-o output] -l <lang> [--bilingual]
|
|
46
|
+
omnicaptions download <url> [-o output] [-q quality]
|
|
47
|
+
omnicaptions LaiCut <audio> <caption> [-o output] [-f format] [-k api-key] [-v]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Development
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Format
|
|
54
|
+
ruff check --fix . && ruff format .
|
|
55
|
+
|
|
56
|
+
# Test
|
|
57
|
+
pytest
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Dependencies
|
|
61
|
+
|
|
62
|
+
- `google-genai`: Gemini API
|
|
63
|
+
- `lattifai-captions`: Caption formats
|
|
64
|
+
- `omnicaptions[alignment]`: Optional - LattifAI for forced alignment
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Skills Development Reference
|
|
69
|
+
|
|
70
|
+
Reference: https://code.claude.com/docs/en/skills
|
|
71
|
+
|
|
72
|
+
### SKILL.md Format
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
---
|
|
76
|
+
name: skill-name # Lowercase, alphanumeric, hyphens (max 64 chars)
|
|
77
|
+
description: When to use this skill # Claude uses this for auto-invocation
|
|
78
|
+
argument-hint: [filename] [format] # Optional: hint for autocomplete
|
|
79
|
+
disable-model-invocation: true # Optional: prevent auto-loading, manual /name only
|
|
80
|
+
user-invocable: false # Optional: hide from / menu (background knowledge)
|
|
81
|
+
allowed-tools: Read, Grep, Bash(python:*) # Optional: tools without permission
|
|
82
|
+
model: sonnet # Optional: model override
|
|
83
|
+
context: fork # Optional: run in isolated subagent
|
|
84
|
+
agent: Explore # Optional: subagent type (Explore, Plan, general-purpose)
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
Your skill instructions here...
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Frontmatter Fields
|
|
91
|
+
|
|
92
|
+
| Field | Required | Description |
|
|
93
|
+
|-------|----------|-------------|
|
|
94
|
+
| `name` | No | Display name, becomes `/plugin:name` |
|
|
95
|
+
| `description` | Recommended | When to use - Claude uses for auto-invocation |
|
|
96
|
+
| `argument-hint` | No | Autocomplete hint: `[issue-number]` |
|
|
97
|
+
| `disable-model-invocation` | No | `true` = manual only, no auto-load |
|
|
98
|
+
| `user-invocable` | No | `false` = background knowledge only |
|
|
99
|
+
| `allowed-tools` | No | Tools without permission prompts |
|
|
100
|
+
| `model` | No | Model override when skill active |
|
|
101
|
+
| `context` | No | `fork` = isolated subagent |
|
|
102
|
+
| `agent` | No | Subagent type: `Explore`, `Plan`, `general-purpose` |
|
|
103
|
+
|
|
104
|
+
### Invocation Control
|
|
105
|
+
|
|
106
|
+
| Config | User invoke | Claude invoke | Context |
|
|
107
|
+
|--------|-------------|---------------|---------|
|
|
108
|
+
| (default) | ✓ | ✓ | Description always; full on invoke |
|
|
109
|
+
| `disable-model-invocation: true` | ✓ | ✗ | Manual only |
|
|
110
|
+
| `user-invocable: false` | ✗ | ✓ | Background knowledge |
|
|
111
|
+
|
|
112
|
+
### String Substitutions
|
|
113
|
+
|
|
114
|
+
| Variable | Description |
|
|
115
|
+
|----------|-------------|
|
|
116
|
+
| `$ARGUMENTS` | Arguments passed when invoking |
|
|
117
|
+
| `${CLAUDE_SESSION_ID}` | Current session ID |
|
|
118
|
+
|
|
119
|
+
### Dynamic Context Injection
|
|
120
|
+
|
|
121
|
+
Use `` `!command` `` to run shell and inject output:
|
|
122
|
+
|
|
123
|
+
```markdown
|
|
124
|
+
## Current status
|
|
125
|
+
- Branch: !`git branch --show-current`
|
|
126
|
+
- Changes: !`git status --short`
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Best Practices
|
|
130
|
+
|
|
131
|
+
1. Keep SKILL.md focused (<500 lines)
|
|
132
|
+
2. Reference supporting files for details
|
|
133
|
+
3. Write descriptive descriptions for auto-invocation
|
|
134
|
+
4. Use `disable-model-invocation: true` for side-effect operations
|
|
135
|
+
5. Use `user-invocable: false` for background context
|
|
136
|
+
|
|
137
|
+
### Plugin Structure
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
plugin/
|
|
141
|
+
├── .claude-plugin/
|
|
142
|
+
│ └── plugin.json # Required manifest
|
|
143
|
+
├── skills/
|
|
144
|
+
│ └── skill-name/SKILL.md # Creates /plugin:skill-name
|
|
145
|
+
└── ...
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### plugin.json Schema
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"name": "plugin-name", // Namespace for skills
|
|
153
|
+
"description": "What it does",
|
|
154
|
+
"version": "1.0.0",
|
|
155
|
+
"author": { "name": "Author" },
|
|
156
|
+
"repository": "https://github.com/...",
|
|
157
|
+
"license": "MIT"
|
|
158
|
+
}
|
|
159
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lattifai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|