Skip to content
Back to skills

Language 2026 10 08

BSecurity

Rewritten to `/root/ab-test/out/T7_with-skill.js`. Observable behaviour is unchanged.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 26, 2026
ai-agentsexpress

Security analysis

B75/100
  • criticalAccesses sensitive system or user directories

Pro scans all 19 files and shows the line behind each finding

Scanned October 26, 2026

npx -y skills add Siririn77/i-have-autism --skill language-2026-10-08 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Language 2026 10 08?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Language 2026 10 08
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/siririn77-language-2026-10-08-f3ba0f50/badge)](https://www.skillsdirectory.com/skills/siririn77-language-2026-10-08-f3ba0f50)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Rewrite note: proc.js

Rewritten to `/root/ab-test/out/T7_with-skill.js`. Observable behaviour is unchanged.

## What changed (readability only)
- **Names.** `d`/`o`/`r`/`t`/`a`/`p`/`s`/`c` became `orders`/`sellerId`/`accepted`/`total`/… and each loop item is bound once as `order`.
- **Early `continue` instead of nested `if`.** The seller filter and the amount check are now guards, so the main path runs top to bottom with no indentation staircase.
- **Duplicate check named.** `r[j].id == d[i].id → t = 0` became `accepted.some((entry) => entry.id == order.id)` with an early `continue`, so "this id is already listed" is stated once instead of encoded as "set total to zero so it fails the next test".
- **Sort extracted to one expression** and `var` → `const`/`let` in block scope.

## Behaviour kept exactly
- Loose equality (`==`, not `===`) is preserved for both `s` and `id`. `1` and `'1'` still match each other.
- `o == null` still tests `null` **and** `undefined`; rewritten as `sellerId != null` inverted, same set.
- The `a > 0` gate uses the same coercion (e.g. `'3' > 0` is true, `NaN > 0` is false), written as `!(order.a > 0)`.
- `!order.c` truthiness (discount when `c` is absent/`false`/`0`/`null`/`''`) is unchanged; the multiplier `*= 0.9` gives the same float result.
- `total > 0` still drops non-positive totals *after* the discount.
- Output objects are exactly `{ id, total }`, sorted by `total` descending; the array is returned, not the input, and the input array is not mutated.

## Verification
`/root/ab-test/out/_diff_test.js` diffs old vs new:
- 200,000 randomized orders (mixed numeric/string ids, `NaN`, negatives, `0`, missing `c`) → **0 mismatches** in `JSON.stringify` output.
- 13 fixed edge cases (empty array, `undefined` sellerId, `'1'` vs `1`, zero amount, `NaN` amount, duplicate ids across types) → all match.
- Array-like non-iterable input → both produce the same result (no `for…of` introduced).

Files in this skill

  • T1_with-skill.md11.8 KB
  • T1_without-skill.md6.4 KB
  • T2_with-skill.md9.1 KB
  • T2_without-skill.md4.5 KB
  • T3_with-skill.md1.9 KB
  • T3_without-skill.md1.5 KB
  • T4_with-skill.md1.2 KB
  • T4_without-skill.md1.1 KB
  • T5_with-skill.md6.2 KB
  • T5_without-skill.md3.5 KB
  • T6_with-skill.md5.6 KB
  • T6_without-skill.md3.7 KB
  • T7_with-skill.md1.9 KB
  • T7_without-skill.md2.3 KB
  • T8_with-skill.md2.9 KB
  • T8_without-skill.md4.4 KB
  • T9_with-skill.md7.1 KB
  • T9_without-skill.md3.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.