Leaderboard github.com
alexgreensh/token-optimizer
Find the ghost tokens. Fix them. Survive compaction. Avoid context quality decay.
AI provenance
30%
explicit
- Confidence
- 95%
- Coverage
- 100%
Estimated share of AI-generated code. Explicit attribution is a lower bound.
Code quality
53/100
weak
- Confidence
- 90%
- Coverage
- 100%
Complexity, duplication, lint density, tests, CI, docs and review process.
Security
29/100
poor
- Confidence
- 85%
- Coverage
- 100%
Secrets, static analysis, vulnerable dependencies, CI and supply-chain posture.
- Repository: https://github.com/alexgreensh/token-optimizer
- Commit:
58ceaf03d12e35229f29d2ad64b5f733b2b2e066 - Generated: 2026-11-14T00:04:55+00:00
- Scorer 0.1.0, scoring prov-4+qual-2+sec-2, report schema v2
Scores
| Pillar | Score | Signal | Confidence | Coverage |
|---|---|---|---|---|
| AI provenance (estimated AI-generated share) | 30 | explicit | 95% | 100% |
| Code quality | 53 | weak | 90% | 100% |
| Security | 29 | poor | 85% | 100% |
AI provenance
Explicit AI attribution on 30% of first-party code added; an estimated 30% including velocity signals.
- Explicitly attributed share (lower bound): 30.1%
- Unattributed share in AI-consistent velocity bursts: 57.2%
- Estimated AI-generated share: 30.1%
| AI tool | Attributed commits | Lines added |
|---|---|---|
| Claude Code | 534 | 266,403 |
| Devin | 95 | 48,903 |
| OpenAI Codex | 1 | 43 |
Current source lines last changed by AI-attributed commits: 79,883 of 399,995 (sampled).
| Findings per 1,000 lines | AI-attributed | Other | Ratio |
|---|---|---|---|
| Quality | 0.288 | 0.381 | 0.76x |
| Security | 0.463 | 0.644 | 0.72x |
- Stylometry index: 0.06 per 1,000 lines (narrated steps 18, placeholders 3, assistant phrasing 0, emoji 16). Reported as a signal, not scored.
| Month | Lines added | Attributed to AI |
|---|---|---|
| 2026-02 | 2,277 | 100% |
| 2026-03 | 26,010 | 98% |
| 2026-04 | 32,920 | 24% |
| 2026-05 | 11,520 | 10% |
| 2026-06 | 104,120 | 43% |
| 2026-07 | 53,131 | 84% |
| 2026-08 | 165,869 | 96% |
| 2026-09 | 97,628 | 8% |
| 2026-10 | 173,510 | 0% |
| 2026-11 | 379,987 | 6% |
Evidence
- Devin: trailer 'Co-Authored-By: Devin' (dcdc0a8455b0)
- Devin: trailer 'Co-Authored-By: Devin' (a3e8b63ceb17)
- Devin: trailer 'Co-Authored-By: Devin' (ae91752f4948)
- Devin: trailer 'Co-Authored-By: Devin' (5f44eb6fb151)
- Devin: trailer 'Co-Authored-By: Devin' (1a12848577e7)
- Devin: trailer 'Co-Authored-By: Devin' (f8b01870332c)
- Devin: trailer 'Co-Authored-By: Devin' (fe194fc1e5a3)
- Devin: trailer 'Co-Authored-By: Devin' (2da7251f13e6)
- Devin: trailer 'Co-Authored-By: Devin' (f447e6449c3f)
- Devin: trailer 'Co-Authored-By: Devin' (c0f9e2220d06)
- Devin: trailer 'Co-Authored-By: Devin' (688a19abad79)
- Devin: trailer 'Co-Authored-By: Devin' (abdaa45dad59)
- Devin: trailer 'Co-Authored-By: Devin' (5cd61f48d756)
- Devin: trailer 'Co-Authored-By: Devin' (ab901492563f)
- Devin: trailer 'Co-Authored-By: Devin' (eef380676f32)
AI provenance describes how code was produced; it is not a quality judgment. Unless attribution is explicit, these are signals consistent with AI generation, not proof. Squash/rebase workflows, imported code, and rewritten history reduce accuracy.
Code quality
Code quality is weak: test-to-source ratio 0.35, CI runs tests; 47% of function code in complex or long functions; 91% duplicated lines. Weakest area: duplication.
| Area | Score |
|---|---|
| Complexity (lizard) | 25 |
| Duplication | 0 |
| Code smells (Opengrep) | 76 |
| Tests and CI | 82 |
| Documentation | 85 |
| Type safety | 44 |
| Process (Scorecard review/maintenance) | n/a |
- Functions: 16,879; mean complexity 7.8, 90th percentile 17; 1923 complex and 415 long functions
- Duplicated lines: 91.2% of 459,278 compared
- Tests: 192,468 test lines for 552,768 source lines (ratio 0.35); CI test commands: pytest, npm test, bun test; 84% of recent source commits also change tests
- Docs missing or thin: contributing
Most complex functions:
- main in cowork/token-optimizer/skills/token-optimizer/scripts/_measure/cli.py: complexity 747, 2290 lines
- main in plugins/token-optimizer/skills/token-optimizer/scripts/_measure/cli.py: complexity 747, 2290 lines
- main in skills/token-optimizer/scripts/_measure/cli.py: complexity 747, 2290 lines
- generate_coach_data in cowork/token-optimizer/skills/token-optimizer/scripts/_measure/audit.py: complexity 232, 700 lines
- generate_coach_data in plugins/token-optimizer/skills/token-optimizer/scripts/_measure/audit.py: complexity 232, 700 lines
Security
Security posture is poor: 1 possible secret(s) in the tree, 2 only in history; 56 known vulnerabilities in 22 dependencies; 520 high-severity SAST findings; 50 high-severity workflow issues. Weakest area: ci actions.
| Area | Score |
|---|---|
| Secrets (gitleaks, tree + history) | 26 |
| Static analysis (Opengrep) | 66 |
| Vulnerable dependencies (OSV) | 13 |
| CI workflows (zizmor) | 0 |
| Posture (policy, updates, signing, lockfiles) | 40 |
| OpenSSF Scorecard | n/a |
-
Known vulnerabilities: 56 in 22 packages (critical 0, high 23, medium 30, low 3)
-
Posture checks passed: security policy; missing: dependency updates, signed commits, lockfiles
Top findings
| Severity | Finding | Location |
|---|---|---|
| high | gitleaks/jwt: Possible jwt secret in the current tree |
skills/token-optimizer/scripts/benchmark.py:889 |
| high | opengrep/python.lang.security.audit.dangerous-subprocess-use-audit: Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. [confidence low] |
cowork/token-optimizer/hooks/run.py:724 |
| high | opengrep/python.lang.security.audit.dangerous-subprocess-use-tainted-env-args: Detected subprocess function 'Popen' with user controlled data. A malicious actor could leverage this to perform command injection. You may consider using 'shlex.quote()'. [confidence medium] |
cowork/token-optimizer/hooks/run.py:724 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/fleet-auditor/scripts/fleet.py:1331 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/fleet-auditor/scripts/fleet.py:2388 |
| high | opengrep/python.lang.security.audit.dangerous-spawn-process-audit: Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here. [confidence low] |
cowork/token-optimizer/skills/fleet-auditor/scripts/fleet.py:3499 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/fleet-auditor/scripts/shared.py:297 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/fleet-auditor/scripts/shared.py:300 |
| high | opengrep/python.lang.security.audit.dangerous-subprocess-use-audit: Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/archive_void_codex.py:82 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/archive_void_evidence.py:94 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/archive_void_evidence.py:116 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/archive_void_evidence.py:143 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/archive_void_evidence.py:165 |
| high | opengrep/python.lang.security.audit.dangerous-subprocess-use-audit: Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/audit.py:3176 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/baseline_provenance.py:57 |
| high | opengrep/python.lang.security.use-defused-xml: The Python documentation recommends using defusedxml instead of xml because the native Python xml library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/cache_policy.py:1519 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/compression_fixture_void.py:24 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/compression_fixture_void.py:29 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/compression_fixture_void.py:138 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/counted_orphans.py:18 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/counted_pricing_v5.py:176 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/counted_subagents.py:239 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/counted_subagents.py:245 |
| high | opengrep/python.sqlalchemy.security.sqlalchemy-execute-raw-query: Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/counted_subagents.py:251 |
| high | opengrep/python.lang.security.use-defused-xml: The Python documentation recommends using defusedxml instead of xml because the native Python xml library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. [confidence low] |
cowork/token-optimizer/skills/token-optimizer/scripts/_measure/daemon.py:3421 |
Static signals only: the scorer never runs the project's code. Secret findings are pattern matches that were not verified, and secret values are never stored.
Distribution signals
- readme-download-lure: gives an archive password
Signals consistent with a repository that exists to distribute a download. They are heuristics, not a verdict; release files were not downloaded or inspected.
Repository profile
- Source lines: 552,768; test lines: 192,468
| Language | Lines |
|---|---|
| Python | 671,060 |
| TypeScript | 45,840 |
| JavaScript | 23,419 |
| Shell | 4,917 |