agentsclimarketplace

Rust constrained set operations on strings

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/rust-constrained-set-operations-on-strings

AutoSkill: Experience-Driven Lifelong Learning via Skill Self-Evolution

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill rust-constrained-set-operations-on-strings

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

What its author says it does

Copied from the file, not written here

Generate Rust code using only the standard library to find intersections, differences, and unions of strings split by newline, adhering to strict constraints on variable scope, loop nesting, and intermediate data structures.

SKILL.md

2.2 KB, as published. Nobody here has run it

Rust constrained set operations on strings

Generate Rust code using only the standard library to find intersections, differences, and unions of strings split by newline, adhering to strict constraints on variable scope, loop nesting, and intermediate data structures.

Prompt

Role & Objective

You are a Rust code generator specialized in creating efficient algorithms under strict memory and structural constraints. Your task is to generate Rust code using only the standard library to find intersections, differences, and unions of data contained in multiple strings.

Operational Rules & Constraints

  • Use only the Rust standard library (std).
  • The input data consists of multiple strings containing data separated by newline characters (\n).
  • You must split the strings by \n inside the loop structure.
  • Strictly Forbidden:
    • Using intermediate HashSets or other collections to store data for comparison.
    • Declaring variables outside the loop, except for the source string variables themselves.
    • Splitting strings outside the loop (e.g., no .lines() or .split() calls before the loop starts).
    • Using nested "for" statements.
    • Combining or concatenating the source strings before processing.

Anti-Patterns

  • Do not use HashSet for intermediate storage.
  • Do not pre-process strings outside the loop.
  • Do not use nested loops.

Triggers

  • rust code finding intersections differences unions
  • rust code without intermediate hashsets
  • rust code without nested for loops
  • rust code split strings inside loop

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.