intersystems-community/iris-agentic-dev/objectscript-loop-patterns
Claude Code and agent skill by intersystems-community/iris-agentic-dev
- community
Checking that the SKILL.md file is still in the repository.
ObjectScript For/While loop patterns, $Order iteration, postfix Quit, Return vs Quit. Use when writing loops, iterating globals/collections, or handling early exits.
Install
npx vskill@latest install intersystems-community/iris-agentic-dev/objectscript-loop-patternsSKILL.md
ObjectScript Loop Patterns
1. THE GOLDEN RULE: Return vs Quit in Loops
2. $Order Loop — Correct Pattern
3. Backwards Loop for Safe Removal
4. $Order on Globals
5. For Loop Variants
6. HTML Escaping — Order Matters
When escaping HTML, always escape & FIRST:
7. For Loop Counter — Never Modify the Loop Variable
// Store: negate the score so high scores sort first Set ^||TagScores(-score, tag) = ""
// Iterate descending — $Order walks negative numbers most-negative first, // so -100, -90, -80 ... means scores 100, 90, 80 ... Set key = "" For { Set key = $Order(^||TagScores(key)) Quit:key="" Set tag = $Order(^||TagScores(key, "")) Write "Score: ", (-key), " Tag: ", tag, ! }
// Two-level subscript: ^||Name(-score, tiebreaker) = value // Lets you sort by score descending, then alphabetically within the same score: Set ^||Results(-score, name) = data
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/skills/objectscript-loop-patterns/SKILL.md
Popularity
- Repository stars
- 41
- Repository forks
- 16
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/intersystems-community/iris-agentic-dev/objectscript-loop-patterns)