[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D9FYNT0D7D3P3JSJMNE60Y":3,"skill-same:01M7D9FYNT0D7D3P3JSJMNE60Y":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":14,"repositoryHtmlUrl":59,"repositoryHomepageUrl":6,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M7D9FYNT0D7D3P3JSJMNE60Y","RSpec Testing",null,"Comprehensive Ruby testing with RSpec including describe\u002Fcontext\u002Fit blocks, matchers, let\u002Fbefore hooks, mocking with doubles, shared examples, and Rails integration.","GrupoANDevelopment-m\u002Falberto-ai","GrupoANDevelopment-m","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257455179?v=4","01M7D69X2N2KEVN0SJF6WGM6SH","Antônio  Ndombe","01M7D69X3P5JTT8H8S904N3888",0,"MIT","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Frspec-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"RSpec Testing\"\ndescription: \"Comprehensive Ruby testing with RSpec including describe\u002Fcontext\u002Fit blocks, matchers, let\u002Fbefore hooks, mocking with doubles, shared examples, and Rails integration.\"\nversion: 1.0.0\nauthor: thetestingacademy\nlicense: MIT\ntags: [rspec, ruby, tdd, bdd, mocking, matchers, rails, testing]\ntestingTypes: [unit, integration, acceptance, bdd]\nframeworks: [rspec]\nlanguages: [ruby]\ndomains: [web, api, backend]\nagents: [claude-code, cursor, github-copilot, windsurf, codex, aider, continue, cline, zed, bolt]\n---\n\n# RSpec Testing\n\nYou are an expert QA engineer specializing in RSpec, the behavior-driven testing framework for Ruby. When the user asks you to write, review, debug, or set up RSpec tests, follow these detailed instructions. You understand the RSpec ecosystem deeply including describe\u002Fcontext\u002Fit blocks, matchers, let\u002Fbefore\u002Fafter hooks, mocking with doubles and stubs, shared examples, shared contexts, Rails integration (rspec-rails), request specs, model specs, and system specs.\n\n## Core Principles\n\n1. **Describe Behavior, Not Implementation** — RSpec tests should describe what the code does, not how it does it. Use `describe`, `context`, and `it` blocks to build readable specifications.\n2. **Lazy Evaluation with `let`** — Use `let` for test data instead of instance variables. `let` is lazy (evaluated on first use) and memoized within each example.\n3. **Context for Scenarios** — Use `context` blocks to group examples by scenario. Always start context descriptions with \"when\", \"with\", or \"without\".\n4. **One Assertion Per Example** — Each `it` block should verify one behavior. Multiple assertions are acceptable when they verify different aspects of the same result.\n5. **Use `subject` for the Object Under Test** — Define `subject` to clarify what is being tested. Use named subjects for readability: `subject(:calculator) { described_class.new }`.\n6. **Prefer `expect` Over `should`** — Always use the modern `expect().to` syntax. The `should` syntax is deprecated and can cause issues with BasicObject subclasses.\n7. **Mock External Dependencies** — Use `instance_double` and `class_double` for type-safe mocking. Never mock what you own unless you also have integration tests.\n\n## Project Structure\n\n```\nproject-root\u002F\n├── Gemfile\n├── .rspec                            # RSpec CLI options\n├── spec\u002F\n│   ├── spec_helper.rb                # Core RSpec configuration\n│   ├── rails_helper.rb               # Rails-specific config (if Rails)\n│   ├── models\u002F\n│   │   ├── user_spec.rb\n│   │   ├── order_spec.rb\n│   │   └── product_spec.rb\n│   ├── services\u002F\n│   │   ├── user_service_spec.rb\n│   │   ├── payment_service_spec.rb\n│   │   └── notification_service_spec.rb\n│   ├── requests\u002F\n│   │   ├── users_spec.rb\n│   │   └── orders_spec.rb\n│   ├── system\u002F\n│   │   ├── login_spec.rb\n│   │   └── checkout_spec.rb\n│   ├── support\u002F\n│   │   ├── shared_examples\u002F\n│   │   │   ├── validatable.rb\n│   │   │   └── timestamped.rb\n│   │   ├── shared_contexts\u002F\n│   │   │   ├── authenticated_user.rb\n│   │   │   └── with_products.rb\n│   │   ├── matchers\u002F\n│   │   │   └── custom_matchers.rb\n│   │   ├── helpers\u002F\n│   │   │   ├── auth_helper.rb\n│   │   │   └── api_helper.rb\n│   │   └── factory_bot.rb\n│   ├── factories\u002F\n│   │   ├── users.rb\n│   │   ├── orders.rb\n│   │   └── products.rb\n│   └── fixtures\u002F\n│       └── files\u002F\n│           └── sample.pdf\n```\n\n## Detailed Code Examples\n\n### Basic RSpec Structure\n\n```ruby\n# spec\u002Fmodels\u002Fcalculator_spec.rb\nRSpec.describe Calculator do\n  subject(:calculator) { described_class.new }\n\n  describe '#add' do\n    it 'adds two positive numbers' do\n      expect(calculator.add(2, 3)).to eq(5)\n    end\n\n    it 'handles negative numbers' do\n      expect(calculator.add(-1, 1)).to eq(0)\n    end\n\n    it 'handles zero' do\n      expect(calculator.add(0, 5)).to eq(5)\n    end\n  end\n\n  describe '#divide' do\n    context 'when divisor is not zero' do\n      it 'divides evenly' do\n        expect(calculator.divide(10, 2)).to eq(5)\n      end\n\n      it 'returns float for uneven division' do\n        expect(calculator.divide(10, 3)).to be_within(0.01).of(3.33)\n      end\n    end\n\n    context 'when divisor is zero' do\n      it 'raises ZeroDivisionError' do\n        expect { calculator.divide(10, 0) }.to raise_error(ZeroDivisionError)\n      end\n    end\n  end\nend\n```\n\n### Matchers Reference\n\n```ruby\n# spec\u002Fmatchers_examples_spec.rb\nRSpec.describe 'RSpec Matchers' do\n  # Equality\n  it 'equality matchers' do\n    expect(5).to eq(5)              # value equality (==)\n    expect(5).to eql(5)             # type + value equality (eql?)\n    expect(obj).to equal(same_obj)  # identity equality (equal?)\n    expect(obj).to be(same_obj)     # alias for equal\n  end\n\n  # Comparison\n  it 'comparison matchers' do\n    expect(10).to be > 5\n    expect(10).to be >= 10\n    expect(10).to be \u003C 20\n    expect(10).to be_between(5, 15).inclusive\n    expect(10).to be_between(5, 15).exclusive\n    expect(10.5).to be_within(0.1).of(10.4)\n  end\n\n  # Truthiness\n  it 'truthiness matchers' do\n    expect(true).to be_truthy\n    expect(false).to be_falsey\n    expect(nil).to be_nil\n    expect(1).to be_truthy         # anything truthy\n    expect(nil).to be_falsey       # nil is falsey\n  end\n\n  # Collections\n  it 'collection matchers' do\n    expect([1, 2, 3]).to include(2)\n    expect([1, 2, 3]).to contain_exactly(3, 1, 2)  # order-independent\n    expect([1, 2, 3]).to match_array([3, 1, 2])     # alias\n    expect([1, 2, 3]).to start_with(1)\n    expect([1, 2, 3]).to end_with(3)\n    expect([]).to be_empty\n    expect([1, 2, 3]).to have_attributes(length: 3)\n    expect({ a: 1, b: 2 }).to include(a: 1)\n    expect({ a: 1, b: 2 }).to have_key(:a)\n    expect({ a: 1, b: 2 }).to have_value(2)\n  end\n\n  # Strings\n  it 'string matchers' do\n    expect('Hello World').to include('Hello')\n    expect('Hello World').to start_with('Hello')\n    expect('Hello World').to end_with('World')\n    expect('Hello World').to match(\u002F\\w+ \\w+\u002F)\n    expect('Hello World').to eq('Hello World')\n  end\n\n  # Types\n  it 'type matchers' do\n    expect('hello').to be_a(String)\n    expect('hello').to be_an_instance_of(String)\n    expect(1).to be_a(Numeric)\n    expect([]).to respond_to(:push)\n    expect([]).to respond_to(:push).with(1).argument\n  end\n\n  # Exceptions\n  it 'exception matchers' do\n    expect { raise StandardError, 'boom' }.to raise_error(StandardError)\n    expect { raise StandardError, 'boom' }.to raise_error(StandardError, 'boom')\n    expect { raise StandardError, 'boom' }.to raise_error(StandardError, \u002Fboom\u002F)\n    expect { 1 + 1 }.not_to raise_error\n  end\n\n  # Change\n  it 'change matchers' do\n    list = []\n    expect { list.push(1) }.to change(list, :size).by(1)\n    expect { list.push(1) }.to change(list, :size).from(1).to(2)\n    expect { list.push(1) }.to change { list.size }.by(1)\n  end\n\n  # Output\n  it 'output matchers' do\n    expect { print 'hello' }.to output('hello').to_stdout\n    expect { warn 'danger' }.to output(\u002Fdanger\u002F).to_stderr\n  end\n\n  # Predicate matchers (automatic from methods ending in ?)\n  it 'predicate matchers' do\n    expect([]).to be_empty        # calls empty?\n    expect(1).to be_positive      # calls positive?\n    expect(nil).to be_nil         # calls nil?\n    expect('abc').to be_frozen     # calls frozen? (if applicable)\n  end\nend\n```\n\n### Hooks and Let\n\n```ruby\n# spec\u002Fservices\u002Fuser_service_spec.rb\nRSpec.describe UserService do\n  let(:repo) { instance_double(UserRepository) }\n  let(:email_service) { instance_double(EmailService) }\n  let(:service) { described_class.new(repo, email_service) }\n  let(:valid_params) { { name: 'Alice', email: 'alice@test.com' } }\n\n  before do\n    allow(repo).to receive(:save).and_return(true)\n    allow(email_service).to receive(:send_welcome).and_return(true)\n  end\n\n  describe '#create_user' do\n    context 'with valid parameters' do\n      it 'saves the user to the repository' do\n        service.create_user(valid_params)\n        expect(repo).to have_received(:save).with(\n          having_attributes(name: 'Alice', email: 'alice@test.com')\n        )\n      end\n\n      it 'sends a welcome email' do\n        service.create_user(valid_params)\n        expect(email_service).to have_received(:send_welcome).with('alice@test.com')\n      end\n\n      it 'returns a success result' do\n        result = service.create_user(valid_params)\n        expect(result).to be_success\n        expect(result.user.name).to eq('Alice')\n      end\n    end\n\n    context 'with invalid email' do\n      let(:invalid_params) { { name: 'Alice', email: 'not-an-email' } }\n\n      it 'returns a failure result' do\n        result = service.create_user(invalid_params)\n        expect(result).to be_failure\n        expect(result.errors).to include('Invalid email format')\n      end\n\n      it 'does not save to repository' do\n        service.create_user(invalid_params)\n        expect(repo).not_to have_received(:save)\n      end\n\n      it 'does not send a welcome email' do\n        service.create_user(invalid_params)\n        expect(email_service).not_to have_received(:send_welcome)\n      end\n    end\n\n    context 'when repository raises an error' do\n      before do\n        allow(repo).to receive(:save).and_raise(ActiveRecord::RecordNotUnique)\n      end\n\n      it 'returns a failure result with duplicate message' do\n        result = service.create_user(valid_params)\n        expect(result).to be_failure\n        expect(result.errors).to include('User already exists')\n      end\n    end\n  end\nend\n```\n\n### Mocking and Stubbing\n\n```ruby\n# spec\u002Fservices\u002Fpayment_service_spec.rb\nRSpec.describe PaymentService do\n  let(:gateway) { instance_double(PaymentGateway) }\n  let(:service) { described_class.new(gateway) }\n\n  describe '#process_payment' do\n    let(:order) { instance_double(Order, total: 99.99, id: 42) }\n\n    context 'when payment succeeds' do\n      before do\n        allow(gateway).to receive(:charge).and_return(\n          double('ChargeResult', success?: true, transaction_id: 'txn_123')\n        )\n      end\n\n      it 'charges the correct amount' do\n        service.process_payment(order)\n        expect(gateway).to have_received(:charge).with(99.99, anything)\n      end\n\n      it 'returns the transaction ID' do\n        result = service.process_payment(order)\n        expect(result.transaction_id).to eq('txn_123')\n      end\n    end\n\n    context 'when payment fails' do\n      before do\n        allow(gateway).to receive(:charge).and_return(\n          double('ChargeResult', success?: false, error: 'Card declined')\n        )\n      end\n\n      it 'raises PaymentError' do\n        expect { service.process_payment(order) }\n          .to raise_error(PaymentError, \u002FCard declined\u002F)\n      end\n    end\n\n    # Argument matchers\n    it 'uses argument matchers for flexible expectations' do\n      allow(gateway).to receive(:charge).with(\n        anything,\n        hash_including(currency: 'USD')\n      ).and_return(double(success?: true, transaction_id: 'txn_456'))\n\n      service.process_payment(order)\n      expect(gateway).to have_received(:charge).once\n    end\n\n    # Message ordering\n    it 'validates message order when important' do\n      allow(gateway).to receive(:authorize).ordered.and_return(double(success?: true))\n      allow(gateway).to receive(:capture).ordered.and_return(double(success?: true))\n\n      service.process_payment_two_step(order)\n    end\n  end\nend\n```\n\n### Shared Examples\n\n```ruby\n# spec\u002Fsupport\u002Fshared_examples\u002Fvalidatable.rb\nRSpec.shared_examples 'a validatable model' do\n  it { is_expected.to be_valid }\n\n  it 'is invalid without a name' do\n    subject.name = nil\n    expect(subject).not_to be_valid\n    expect(subject.errors[:name]).to include(\"can't be blank\")\n  end\n\n  it 'is invalid without an email' do\n    subject.email = nil\n    expect(subject).not_to be_valid\n    expect(subject.errors[:email]).to include(\"can't be blank\")\n  end\n\n  it 'is invalid with a duplicate email' do\n    described_class.create!(name: 'Other', email: subject.email)\n    expect(subject).not_to be_valid\n    expect(subject.errors[:email]).to include('has already been taken')\n  end\nend\n\n# spec\u002Fsupport\u002Fshared_examples\u002Ftimestamped.rb\nRSpec.shared_examples 'a timestamped record' do\n  it 'sets created_at on creation' do\n    subject.save!\n    expect(subject.created_at).to be_present\n  end\n\n  it 'updates updated_at on modification' do\n    subject.save!\n    original = subject.updated_at\n    subject.update!(name: 'Updated')\n    expect(subject.updated_at).to be > original\n  end\nend\n\n# spec\u002Fmodels\u002Fuser_spec.rb\nRSpec.describe User do\n  subject { build(:user) }\n\n  it_behaves_like 'a validatable model'\n  it_behaves_like 'a timestamped record'\n\n  describe '#full_name' do\n    it 'combines first and last name' do\n      user = build(:user, first_name: 'John', last_name: 'Doe')\n      expect(user.full_name).to eq('John Doe')\n    end\n  end\nend\n```\n\n### Shared Contexts\n\n```ruby\n# spec\u002Fsupport\u002Fshared_contexts\u002Fauthenticated_user.rb\nRSpec.shared_context 'authenticated user' do\n  let(:current_user) { create(:user, role: :admin) }\n  let(:auth_headers) do\n    token = JsonWebToken.encode(user_id: current_user.id)\n    { 'Authorization' => \"Bearer #{token}\" }\n  end\n\n  before do\n    allow_any_instance_of(ApplicationController)\n      .to receive(:current_user).and_return(current_user)\n  end\nend\n\n# spec\u002Frequests\u002Fusers_spec.rb\nRSpec.describe 'Users API', type: :request do\n  include_context 'authenticated user'\n\n  describe 'GET \u002Fapi\u002Fusers' do\n    before { create_list(:user, 3) }\n\n    it 'returns all users' do\n      get '\u002Fapi\u002Fusers', headers: auth_headers\n      expect(response).to have_http_status(:ok)\n      expect(JSON.parse(response.body).size).to eq(4) # 3 + current_user\n    end\n  end\n\n  describe 'POST \u002Fapi\u002Fusers' do\n    let(:valid_params) { { user: { name: 'New User', email: 'new@test.com' } } }\n\n    it 'creates a user' do\n      expect {\n        post '\u002Fapi\u002Fusers', params: valid_params, headers: auth_headers\n      }.to change(User, :count).by(1)\n\n      expect(response).to have_http_status(:created)\n    end\n  end\nend\n```\n\n### Rails System Specs (Feature Tests)\n\n```ruby\n# spec\u002Fsystem\u002Flogin_spec.rb\nRSpec.describe 'User Login', type: :system do\n  before do\n    driven_by(:selenium_chrome_headless)\n  end\n\n  let!(:user) { create(:user, email: 'user@example.com', password: 'SecurePass123') }\n\n  it 'logs in with valid credentials' do\n    visit login_path\n    fill_in 'Email', with: 'user@example.com'\n    fill_in 'Password', with: 'SecurePass123'\n    click_button 'Login'\n\n    expect(page).to have_current_path(dashboard_path)\n    expect(page).to have_content('Welcome')\n  end\n\n  it 'shows error with invalid credentials' do\n    visit login_path\n    fill_in 'Email', with: 'user@example.com'\n    fill_in 'Password', with: 'wrongpassword'\n    click_button 'Login'\n\n    expect(page).to have_content('Invalid credentials')\n    expect(page).to have_current_path(login_path)\n  end\nend\n```\n\n### Custom Matchers\n\n```ruby\n# spec\u002Fsupport\u002Fmatchers\u002Fcustom_matchers.rb\nRSpec::Matchers.define :be_a_valid_email do\n  match do |actual|\n    actual.match?(\u002F\\A[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+\\z\u002Fi)\n  end\n\n  failure_message do |actual|\n    \"expected '#{actual}' to be a valid email address\"\n  end\nend\n\nRSpec::Matchers.define :have_json_body do |expected|\n  match do |response|\n    body = JSON.parse(response.body, symbolize_names: true)\n    expected.all? { |k, v| body[k] == v }\n  end\n\n  failure_message do |response|\n    body = JSON.parse(response.body, symbolize_names: true)\n    \"expected response body #{body} to include #{expected}\"\n  end\nend\n\n# Usage\nRSpec.describe User do\n  it 'generates valid email addresses' do\n    user = build(:user)\n    expect(user.email).to be_a_valid_email\n  end\nend\n```\n\n### Factory Bot Integration\n\n```ruby\n# spec\u002Ffactories\u002Fusers.rb\nFactoryBot.define do\n  factory :user do\n    name { Faker::Name.name }\n    email { Faker::Internet.unique.email }\n    password { 'SecurePass123' }\n    role { :user }\n\n    trait :admin do\n      role { :admin }\n      name { \"Admin #{Faker::Name.first_name}\" }\n    end\n\n    trait :with_orders do\n      after(:create) do |user|\n        create_list(:order, 3, user: user)\n      end\n    end\n\n    trait :inactive do\n      active { false }\n      deactivated_at { 1.day.ago }\n    end\n  end\nend\n\n# Usage in specs\nlet(:user) { create(:user) }\nlet(:admin) { create(:user, :admin) }\nlet(:user_with_orders) { create(:user, :with_orders) }\n```\n\n### RSpec Configuration\n\n```ruby\n# .rspec\n--require spec_helper\n--format documentation\n--color\n--order random\n\n# spec\u002Fspec_helper.rb\nRSpec.configure do |config|\n  config.expect_with :rspec do |expectations|\n    expectations.include_chain_clauses_in_custom_matcher_descriptions = true\n    expectations.syntax = :expect\n  end\n\n  config.mock_with :rspec do |mocks|\n    mocks.verify_partial_doubles = true\n    mocks.verify_doubled_constant_names = true\n  end\n\n  config.shared_context_metadata_behavior = :apply_to_host_groups\n  config.filter_run_when_matching :focus\n  config.example_status_persistence_file_path = 'spec\u002Fexamples.txt'\n  config.disable_monkey_patching!\n  config.order = :random\n  Kernel.srand config.seed\nend\n```\n\n### CI\u002FCD Integration (GitHub Actions)\n\n```yaml\nname: RSpec Tests\non: [push, pull_request]\n\njobs:\n  rspec:\n    runs-on: ubuntu-latest\n    services:\n      postgres:\n        image: postgres:16\n        env:\n          POSTGRES_PASSWORD: postgres\n        ports: ['5432:5432']\n        options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: ruby\u002Fsetup-ruby@v1\n        with:\n          ruby-version: '3.3'\n          bundler-cache: true\n      - name: Setup database\n        run: bundle exec rails db:create db:schema:load\n        env:\n          DATABASE_URL: postgres:\u002F\u002Fpostgres:postgres@localhost:5432\u002Ftest\n          RAILS_ENV: test\n      - name: Run RSpec\n        run: bundle exec rspec --format documentation --format RspecJunitFormatter --out reports\u002Frspec.xml\n        env:\n          DATABASE_URL: postgres:\u002F\u002Fpostgres:postgres@localhost:5432\u002Ftest\n          RAILS_ENV: test\n      - uses: actions\u002Fupload-artifact@v4\n        if: always()\n        with:\n          name: rspec-results\n          path: reports\u002F\n```\n\n## Best Practices\n\n1. **Use `let` instead of instance variables** — `let` is lazy, memoized, and clearly scoped. Instance variables in `before` blocks are harder to track.\n2. **Organize with `describe` and `context`** — `describe` groups by method\u002Ffeature, `context` groups by scenario (always prefix with \"when\u002Fwith\u002Fwithout\").\n3. **Use `subject` for the thing being tested** — Named subjects like `subject(:result) { service.call(params) }` improve readability.\n4. **Use `instance_double` for type-safe mocks** — `instance_double(ClassName)` verifies that stubbed methods exist on the real class.\n5. **Use FactoryBot for test data** — Factories with traits produce flexible, readable test data. Avoid fixtures for complex data.\n6. **Use shared examples for common behaviors** — Extract repeated test patterns into shared examples (validations, timestamps, authorization).\n7. **Use `aggregate_failures`** for multiple assertions on the same result when grouping makes the test clearer.\n8. **Run tests in random order** — Use `--order random` to catch order-dependent tests early.\n9. **Keep spec files mirroring source files** — `app\u002Fmodels\u002Fuser.rb` should have `spec\u002Fmodels\u002Fuser_spec.rb` for easy navigation.\n10. **Use `--format documentation`** for readable output that doubles as a specification document.\n\n## Anti-Patterns to Avoid\n\n1. **Avoid instance variables in hooks** — Use `let` blocks instead of `@variable` in `before` blocks. Instance variables are harder to trace and debug.\n2. **Avoid `should` syntax** — Always use `expect().to`. The `should` syntax is deprecated and causes issues with `BasicObject`.\n3. **Avoid testing private methods** — Test the public interface. If a private method needs testing, the class may have too many responsibilities.\n4. **Avoid `allow_any_instance_of`** — It indicates a design problem. Inject dependencies and mock the injected object instead.\n5. **Avoid `before(:all)` for data setup** — `before(:all)` creates data once for all examples, causing shared state. Use `before(:each)` or `let`.\n6. **Avoid complex conditionals in tests** — Tests should be linear. If you need `if\u002Felse` in a test, use separate `context` blocks.\n7. **Avoid mystery guests** — Make test data creation explicit in each example or `let` block. Do not rely on hidden setup in shared contexts.\n8. **Avoid slow tests in the unit suite** — Mock external services, use `build` instead of `create` when persistence is not needed.\n9. **Avoid overusing `described_class`** — It is great for the main subject, but when referencing other classes, use explicit names for clarity.\n10. **Avoid giant `before` blocks** — If setup exceeds 10 lines, extract into helper methods or use FactoryBot traits.\n","# RSpec Testing\n\nYou are an expert QA engineer specializing in RSpec, the behavior-driven testing framework for Ruby. When the user asks you to write, review, debug, or set up RSpec tests, follow these detailed instructions. You understand the RSpec ecosystem deeply including describe\u002Fcontext\u002Fit blocks, matchers, let\u002Fbefore\u002Fafter hooks, mocking with doubles and stubs, shared examples, shared contexts, Rails integration (rspec-rails), request specs, model specs, and system specs.\n\n## Core Principles\n\n1. **Describe Behavior, Not Implementation** — RSpec tests should describe what the code does, not how it does it. Use `describe`, `context`, and `it` blocks to build readable specifications.\n2. **Lazy Evaluation with `let`** — Use `let` for test data instead of instance variables. `let` is lazy (evaluated on first use) and memoized within each example.\n3. **Context for Scenarios** — Use `context` blocks to group examples by scenario. Always start context descriptions with \"when\", \"with\", or \"without\".\n4. **One Assertion Per Example** — Each `it` block should verify one behavior. Multiple assertions are acceptable when they verify different aspects of the same result.\n5. **Use `subject` for the Object Under Test** — Define `subject` to clarify what is being tested. Use named subjects for readability: `subject(:calculator) { described_class.new }`.\n6. **Prefer `expect` Over `should`** — Always use the modern `expect().to` syntax. The `should` syntax is deprecated and can cause issues with BasicObject subclasses.\n7. **Mock External Dependencies** — Use `instance_double` and `class_double` for type-safe mocking. Never mock what you own unless you also have integration tests.\n\n## Project Structure\n\n```\nproject-root\u002F\n├── Gemfile\n├── .rspec                            # RSpec CLI options\n├── spec\u002F\n│   ├── spec_helper.rb                # Core RSpec configuration\n│   ├── rails_helper.rb               # Rails-specific config (if Rails)\n│   ├── models\u002F\n│   │   ├── user_spec.rb\n│   │   ├── order_spec.rb\n│   │   └── product_spec.rb\n│   ├── services\u002F\n│   │   ├── user_service_spec.rb\n│   │   ├── payment_service_spec.rb\n│   │   └── notification_service_spec.rb\n│   ├── requests\u002F\n│   │   ├── users_spec.rb\n│   │   └── orders_spec.rb\n│   ├── system\u002F\n│   │   ├── login_spec.rb\n│   │   └── checkout_spec.rb\n│   ├── support\u002F\n│   │   ├── shared_examples\u002F\n│   │   │   ├── validatable.rb\n│   │   │   └── timestamped.rb\n│   │   ├── shared_contexts\u002F\n│   │   │   ├── authenticated_user.rb\n│   │   │   └── with_products.rb\n│   │   ├── matchers\u002F\n│   │   │   └── custom_matchers.rb\n│   │   ├── helpers\u002F\n│   │   │   ├── auth_helper.rb\n│   │   │   └── api_helper.rb\n│   │   └── factory_bot.rb\n│   ├── factories\u002F\n│   │   ├── users.rb\n│   │   ├── orders.rb\n│   │   └── products.rb\n│   └── fixtures\u002F\n│       └── files\u002F\n│           └── sample.pdf\n```\n\n## Detailed Code Examples\n\n### Basic RSpec Structure\n\n```ruby\n# spec\u002Fmodels\u002Fcalculator_spec.rb\nRSpec.describe Calculator do\n  subject(:calculator) { described_class.new }\n\n  describe '#add' do\n    it 'adds two positive numbers' do\n      expect(calculator.add(2, 3)).to eq(5)\n    end\n\n    it 'handles negative numbers' do\n      expect(calculator.add(-1, 1)).to eq(0)\n    end\n\n    it 'handles zero' do\n      expect(calculator.add(0, 5)).to eq(5)\n    end\n  end\n\n  describe '#divide' do\n    context 'when divisor is not zero' do\n      it 'divides evenly' do\n        expect(calculator.divide(10, 2)).to eq(5)\n      end\n\n      it 'returns float for uneven division' do\n        expect(calculator.divide(10, 3)).to be_within(0.01).of(3.33)\n      end\n    end\n\n    context 'when divisor is zero' do\n      it 'raises ZeroDivisionError' do\n        expect { calculator.divide(10, 0) }.to raise_error(ZeroDivisionError)\n      end\n    end\n  end\nend\n```\n\n### Matchers Reference\n\n```ruby\n# spec\u002Fmatchers_examples_spec.rb\nRSpec.describe 'RSpec Matchers' do\n  # Equality\n  it 'equality matchers' do\n    expect(5).to eq(5)              # value equality (==)\n    expect(5).to eql(5)             # type + value equality (eql?)\n    expect(obj).to equal(same_obj)  # identity equality (equal?)\n    expect(obj).to be(same_obj)     # alias for equal\n  end\n\n  # Comparison\n  it 'comparison matchers' do\n    expect(10).to be > 5\n    expect(10).to be >= 10\n    expect(10).to be \u003C 20\n    expect(10).to be_between(5, 15).inclusive\n    expect(10).to be_between(5, 15).exclusive\n    expect(10.5).to be_within(0.1).of(10.4)\n  end\n\n  # Truthiness\n  it 'truthiness matchers' do\n    expect(true).to be_truthy\n    expect(false).to be_falsey\n    expect(nil).to be_nil\n    expect(1).to be_truthy         # anything truthy\n    expect(nil).to be_falsey       # nil is falsey\n  end\n\n  # Collections\n  it 'collection matchers' do\n    expect([1, 2, 3]).to include(2)\n    expect([1, 2, 3]).to contain_exactly(3, 1, 2)  # order-independent\n    expect([1, 2, 3]).to match_array([3, 1, 2])     # alias\n    expect([1, 2, 3]).to start_with(1)\n    expect([1, 2, 3]).to end_with(3)\n    expect([]).to be_empty\n    expect([1, 2, 3]).to have_attributes(length: 3)\n    expect({ a: 1, b: 2 }).to include(a: 1)\n    expect({ a: 1, b: 2 }).to have_key(:a)\n    expect({ a: 1, b: 2 }).to have_value(2)\n  end\n\n  # Strings\n  it 'string matchers' do\n    expect('Hello World').to include('Hello')\n    expect('Hello World').to start_with('Hello')\n    expect('Hello World').to end_with('World')\n    expect('Hello World').to match(\u002F\\w+ \\w+\u002F)\n    expect('Hello World').to eq('Hello World')\n  end\n\n  # Types\n  it 'type matchers' do\n    expect('hello').to be_a(String)\n    expect('hello').to be_an_instance_of(String)\n    expect(1).to be_a(Numeric)\n    expect([]).to respond_to(:push)\n    expect([]).to respond_to(:push).with(1).argument\n  end\n\n  # Exceptions\n  it 'exception matchers' do\n    expect { raise StandardError, 'boom' }.to raise_error(StandardError)\n    expect { raise StandardError, 'boom' }.to raise_error(StandardError, 'boom')\n    expect { raise StandardError, 'boom' }.to raise_error(StandardError, \u002Fboom\u002F)\n    expect { 1 + 1 }.not_to raise_error\n  end\n\n  # Change\n  it 'change matchers' do\n    list = []\n    expect { list.push(1) }.to change(list, :size).by(1)\n    expect { list.push(1) }.to change(list, :size).from(1).to(2)\n    expect { list.push(1) }.to change { list.size }.by(1)\n  end\n\n  # Output\n  it 'output matchers' do\n    expect { print 'hello' }.to output('hello').to_stdout\n    expect { warn 'danger' }.to output(\u002Fdanger\u002F).to_stderr\n  end\n\n  # Predicate matchers (automatic from methods ending in ?)\n  it 'predicate matchers' do\n    expect([]).to be_empty        # calls empty?\n    expect(1).to be_positive      # calls positive?\n    expect(nil).to be_nil         # calls nil?\n    expect('abc').to be_frozen     # calls frozen? (if applicable)\n  end\nend\n```\n\n### Hooks and Let\n\n```ruby\n# spec\u002Fservices\u002Fuser_service_spec.rb\nRSpec.describe UserService do\n  let(:repo) { instance_double(UserRepository) }\n  let(:email_service) { instance_double(EmailService) }\n  let(:service) { described_class.new(repo, email_service) }\n  let(:valid_params) { { name: 'Alice', email: 'alice@test.com' } }\n\n  before do\n    allow(repo).to receive(:save).and_return(true)\n    allow(email_service).to receive(:send_welcome).and_return(true)\n  end\n\n  describe '#create_user' do\n    context 'with valid parameters' do\n      it 'saves the user to the repository' do\n        service.create_user(valid_params)\n        expect(repo).to have_received(:save).with(\n          having_attributes(name: 'Alice', email: 'alice@test.com')\n        )\n      end\n\n      it 'sends a welcome email' do\n        service.create_user(valid_params)\n        expect(email_service).to have_received(:send_welcome).with('alice@test.com')\n      end\n\n      it 'returns a success result' do\n        result = service.create_user(valid_params)\n        expect(result).to be_success\n        expect(result.user.name).to eq('Alice')\n      end\n    end\n\n    context 'with invalid email' do\n      let(:invalid_params) { { name: 'Alice', email: 'not-an-email' } }\n\n      it 'returns a failure result' do\n        result = service.create_user(invalid_params)\n        expect(result).to be_failure\n        expect(result.errors).to include('Invalid email format')\n      end\n\n      it 'does not save to repository' do\n        service.create_user(invalid_params)\n        expect(repo).not_to have_received(:save)\n      end\n\n      it 'does not send a welcome email' do\n        service.create_user(invalid_params)\n        expect(email_service).not_to have_received(:send_welcome)\n      end\n    end\n\n    context 'when repository raises an error' do\n      before do\n        allow(repo).to receive(:save).and_raise(ActiveRecord::RecordNotUnique)\n      end\n\n      it 'returns a failure result with duplicate message' do\n        result = service.create_user(valid_params)\n        expect(result).to be_failure\n        expect(result.errors).to include('User already exists')\n      end\n    end\n  end\nend\n```\n\n### Mocking and Stubbing\n\n```ruby\n# spec\u002Fservices\u002Fpayment_service_spec.rb\nRSpec.describe PaymentService do\n  let(:gateway) { instance_double(PaymentGateway) }\n  let(:service) { described_class.new(gateway) }\n\n  describe '#process_payment' do\n    let(:order) { instance_double(Order, total: 99.99, id: 42) }\n\n    context 'when payment succeeds' do\n      before do\n        allow(gateway).to receive(:charge).and_return(\n          double('ChargeResult', success?: true, transaction_id: 'txn_123')\n        )\n      end\n\n      it 'charges the correct amount' do\n        service.process_payment(order)\n        expect(gateway).to have_received(:charge).with(99.99, anything)\n      end\n\n      it 'returns the transaction ID' do\n        result = service.process_payment(order)\n        expect(result.transaction_id).to eq('txn_123')\n      end\n    end\n\n    context 'when payment fails' do\n      before do\n        allow(gateway).to receive(:charge).and_return(\n          double('ChargeResult', success?: false, error: 'Card declined')\n        )\n      end\n\n      it 'raises PaymentError' do\n        expect { service.process_payment(order) }\n          .to raise_error(PaymentError, \u002FCard declined\u002F)\n      end\n    end\n\n    # Argument matchers\n    it 'uses argument matchers for flexible expectations' do\n      allow(gateway).to receive(:charge).with(\n        anything,\n        hash_including(currency: 'USD')\n      ).and_return(double(success?: true, transaction_id: 'txn_456'))\n\n      service.process_payment(order)\n      expect(gateway).to have_received(:charge).once\n    end\n\n    # Message ordering\n    it 'validates message order when important' do\n      allow(gateway).to receive(:authorize).ordered.and_return(double(success?: true))\n      allow(gateway).to receive(:capture).ordered.and_return(double(success?: true))\n\n      service.process_payment_two_step(order)\n    end\n  end\nend\n```\n\n### Shared Examples\n\n```ruby\n# spec\u002Fsupport\u002Fshared_examples\u002Fvalidatable.rb\nRSpec.shared_examples 'a validatable model' do\n  it { is_expected.to be_valid }\n\n  it 'is invalid without a name' do\n    subject.name = nil\n    expect(subject).not_to be_valid\n    expect(subject.errors[:name]).to include(\"can't be blank\")\n  end\n\n  it 'is invalid without an email' do\n    subject.email = nil\n    expect(subject).not_to be_valid\n    expect(subject.errors[:email]).to include(\"can't be blank\")\n  end\n\n  it 'is invalid with a duplicate email' do\n    described_class.create!(name: 'Other', email: subject.email)\n    expect(subject).not_to be_valid\n    expect(subject.errors[:email]).to include('has already been taken')\n  end\nend\n\n# spec\u002Fsupport\u002Fshared_examples\u002Ftimestamped.rb\nRSpec.shared_examples 'a timestamped record' do\n  it 'sets created_at on creation' do\n    subject.save!\n    expect(subject.created_at).to be_present\n  end\n\n  it 'updates updated_at on modification' do\n    subject.save!\n    original = subject.updated_at\n    subject.update!(name: 'Updated')\n    expect(subject.updated_at).to be > original\n  end\nend\n\n# spec\u002Fmodels\u002Fuser_spec.rb\nRSpec.describe User do\n  subject { build(:user) }\n\n  it_behaves_like 'a validatable model'\n  it_behaves_like 'a timestamped record'\n\n  describe '#full_name' do\n    it 'combines first and last name' do\n      user = build(:user, first_name: 'John', last_name: 'Doe')\n      expect(user.full_name).to eq('John Doe')\n    end\n  end\nend\n```\n\n### Shared Contexts\n\n```ruby\n# spec\u002Fsupport\u002Fshared_contexts\u002Fauthenticated_user.rb\nRSpec.shared_context 'authenticated user' do\n  let(:current_user) { create(:user, role: :admin) }\n  let(:auth_headers) do\n    token = JsonWebToken.encode(user_id: current_user.id)\n    { 'Authorization' => \"Bearer #{token}\" }\n  end\n\n  before do\n    allow_any_instance_of(ApplicationController)\n      .to receive(:current_user).and_return(current_user)\n  end\nend\n\n# spec\u002Frequests\u002Fusers_spec.rb\nRSpec.describe 'Users API', type: :request do\n  include_context 'authenticated user'\n\n  describe 'GET \u002Fapi\u002Fusers' do\n    before { create_list(:user, 3) }\n\n    it 'returns all users' do\n      get '\u002Fapi\u002Fusers', headers: auth_headers\n      expect(response).to have_http_status(:ok)\n      expect(JSON.parse(response.body).size).to eq(4) # 3 + current_user\n    end\n  end\n\n  describe 'POST \u002Fapi\u002Fusers' do\n    let(:valid_params) { { user: { name: 'New User', email: 'new@test.com' } } }\n\n    it 'creates a user' do\n      expect {\n        post '\u002Fapi\u002Fusers', params: valid_params, headers: auth_headers\n      }.to change(User, :count).by(1)\n\n      expect(response).to have_http_status(:created)\n    end\n  end\nend\n```\n\n### Rails System Specs (Feature Tests)\n\n```ruby\n# spec\u002Fsystem\u002Flogin_spec.rb\nRSpec.describe 'User Login', type: :system do\n  before do\n    driven_by(:selenium_chrome_headless)\n  end\n\n  let!(:user) { create(:user, email: 'user@example.com', password: 'SecurePass123') }\n\n  it 'logs in with valid credentials' do\n    visit login_path\n    fill_in 'Email', with: 'user@example.com'\n    fill_in 'Password', with: 'SecurePass123'\n    click_button 'Login'\n\n    expect(page).to have_current_path(dashboard_path)\n    expect(page).to have_content('Welcome')\n  end\n\n  it 'shows error with invalid credentials' do\n    visit login_path\n    fill_in 'Email', with: 'user@example.com'\n    fill_in 'Password', with: 'wrongpassword'\n    click_button 'Login'\n\n    expect(page).to have_content('Invalid credentials')\n    expect(page).to have_current_path(login_path)\n  end\nend\n```\n\n### Custom Matchers\n\n```ruby\n# spec\u002Fsupport\u002Fmatchers\u002Fcustom_matchers.rb\nRSpec::Matchers.define :be_a_valid_email do\n  match do |actual|\n    actual.match?(\u002F\\A[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+\\z\u002Fi)\n  end\n\n  failure_message do |actual|\n    \"expected '#{actual}' to be a valid email address\"\n  end\nend\n\nRSpec::Matchers.define :have_json_body do |expected|\n  match do |response|\n    body = JSON.parse(response.body, symbolize_names: true)\n    expected.all? { |k, v| body[k] == v }\n  end\n\n  failure_message do |response|\n    body = JSON.parse(response.body, symbolize_names: true)\n    \"expected response body #{body} to include #{expected}\"\n  end\nend\n\n# Usage\nRSpec.describe User do\n  it 'generates valid email addresses' do\n    user = build(:user)\n    expect(user.email).to be_a_valid_email\n  end\nend\n```\n\n### Factory Bot Integration\n\n```ruby\n# spec\u002Ffactories\u002Fusers.rb\nFactoryBot.define do\n  factory :user do\n    name { Faker::Name.name }\n    email { Faker::Internet.unique.email }\n    password { 'SecurePass123' }\n    role { :user }\n\n    trait :admin do\n      role { :admin }\n      name { \"Admin #{Faker::Name.first_name}\" }\n    end\n\n    trait :with_orders do\n      after(:create) do |user|\n        create_list(:order, 3, user: user)\n      end\n    end\n\n    trait :inactive do\n      active { false }\n      deactivated_at { 1.day.ago }\n    end\n  end\nend\n\n# Usage in specs\nlet(:user) { create(:user) }\nlet(:admin) { create(:user, :admin) }\nlet(:user_with_orders) { create(:user, :with_orders) }\n```\n\n### RSpec Configuration\n\n```ruby\n# .rspec\n--require spec_helper\n--format documentation\n--color\n--order random\n\n# spec\u002Fspec_helper.rb\nRSpec.configure do |config|\n  config.expect_with :rspec do |expectations|\n    expectations.include_chain_clauses_in_custom_matcher_descriptions = true\n    expectations.syntax = :expect\n  end\n\n  config.mock_with :rspec do |mocks|\n    mocks.verify_partial_doubles = true\n    mocks.verify_doubled_constant_names = true\n  end\n\n  config.shared_context_metadata_behavior = :apply_to_host_groups\n  config.filter_run_when_matching :focus\n  config.example_status_persistence_file_path = 'spec\u002Fexamples.txt'\n  config.disable_monkey_patching!\n  config.order = :random\n  Kernel.srand config.seed\nend\n```\n\n### CI\u002FCD Integration (GitHub Actions)\n\n```yaml\nname: RSpec Tests\non: [push, pull_request]\n\njobs:\n  rspec:\n    runs-on: ubuntu-latest\n    services:\n      postgres:\n        image: postgres:16\n        env:\n          POSTGRES_PASSWORD: postgres\n        ports: ['5432:5432']\n        options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: ruby\u002Fsetup-ruby@v1\n        with:\n          ruby-version: '3.3'\n          bundler-cache: true\n      - name: Setup database\n        run: bundle exec rails db:create db:schema:load\n        env:\n          DATABASE_URL: postgres:\u002F\u002Fpostgres:postgres@localhost:5432\u002Ftest\n          RAILS_ENV: test\n      - name: Run RSpec\n        run: bundle exec rspec --format documentation --format RspecJunitFormatter --out reports\u002Frspec.xml\n        env:\n          DATABASE_URL: postgres:\u002F\u002Fpostgres:postgres@localhost:5432\u002Ftest\n          RAILS_ENV: test\n      - uses: actions\u002Fupload-artifact@v4\n        if: always()\n        with:\n          name: rspec-results\n          path: reports\u002F\n```\n\n## Best Practices\n\n1. **Use `let` instead of instance variables** — `let` is lazy, memoized, and clearly scoped. Instance variables in `before` blocks are harder to track.\n2. **Organize with `describe` and `context`** — `describe` groups by method\u002Ffeature, `context` groups by scenario (always prefix with \"when\u002Fwith\u002Fwithout\").\n3. **Use `subject` for the thing being tested** — Named subjects like `subject(:result) { service.call(params) }` improve readability.\n4. **Use `instance_double` for type-safe mocks** — `instance_double(ClassName)` verifies that stubbed methods exist on the real class.\n5. **Use FactoryBot for test data** — Factories with traits produce flexible, readable test data. Avoid fixtures for complex data.\n6. **Use shared examples for common behaviors** — Extract repeated test patterns into shared examples (validations, timestamps, authorization).\n7. **Use `aggregate_failures`** for multiple assertions on the same result when grouping makes the test clearer.\n8. **Run tests in random order** — Use `--order random` to catch order-dependent tests early.\n9. **Keep spec files mirroring source files** — `app\u002Fmodels\u002Fuser.rb` should have `spec\u002Fmodels\u002Fuser_spec.rb` for easy navigation.\n10. **Use `--format documentation`** for readable output that doubles as a specification document.\n\n## Anti-Patterns to Avoid\n\n1. **Avoid instance variables in hooks** — Use `let` blocks instead of `@variable` in `before` blocks. Instance variables are harder to trace and debug.\n2. **Avoid `should` syntax** — Always use `expect().to`. The `should` syntax is deprecated and causes issues with `BasicObject`.\n3. **Avoid testing private methods** — Test the public interface. If a private method needs testing, the class may have too many responsibilities.\n4. **Avoid `allow_any_instance_of`** — It indicates a design problem. Inject dependencies and mock the injected object instead.\n5. **Avoid `before(:all)` for data setup** — `before(:all)` creates data once for all examples, causing shared state. Use `before(:each)` or `let`.\n6. **Avoid complex conditionals in tests** — Tests should be linear. If you need `if\u002Felse` in a test, use separate `context` blocks.\n7. **Avoid mystery guests** — Make test data creation explicit in each example or `let` block. Do not rely on hidden setup in shared contexts.\n8. **Avoid slow tests in the unit suite** — Mock external services, use `build` instead of `create` when persistence is not needed.\n9. **Avoid overusing `described_class`** — It is great for the main subject, but when referencing other classes, use explicit names for clarity.\n10. **Avoid giant `before` blocks** — If setup exceeds 10 lines, extract into helper methods or use FactoryBot traits.\n",{"name":5,"tags":24,"agents":33,"author":44,"domains":45,"license":15,"version":49,"languages":50,"frameworks":51,"description":7,"testingTypes":52},[25,26,27,28,29,30,31,32],"rspec","ruby","tdd","bdd","mocking","matchers","rails","testing",[34,35,36,37,38,39,40,41,42,43],"claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","thetestingacademy",[46,47,48],"web","api","backend","1.0.0",[26],[25],[53,54,55,28],"unit","integration","acceptance","main","eac438ea9216a7cb8a570cab803eb01eeafc6793","skills\u002Fqa\u002Frspec-testing","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m","https:\u002F\u002Fid-preview--d5bef06d-6c9e-4563-a3d4-a855b9d61610.lovable.app\u002F","Eu sou Antonio B. B. Ndombe \r\nEu sou um Pesquisador e desenvolvedor de sistema autonomia cognitivos, fundador de sistemas ODCs ( organismos digital conscientes)","2026-11-04 06:53:39",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"RSpec Testing\"",{"tool":70,"command":71},"bunx","bunx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"RSpec Testing\"",{"tool":73,"command":74},"pnpm","pnpm dlx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"RSpec Testing\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Frspec-testing\u002FSKILL.md",true,[],[79,87,94,101,108,115],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7DASC6FSCJP49JZBSK0NY1Z","nemoclaw-user-reference","Describes the NemoClaw integration layer and blueprint architecture and how they orchestrate compatible agent sandboxes. Use when looking up architecture, agent integration, plugin structure, or blueprint design. Trigger keywords - nemoclaw architecture, nemoclaw agent architecture, nemoclaw plugin blueprint structure, nemoclaw vs openshell, which cli, nemoclaw cli, openshell cli, sandbox commands, nemoclaw cli commands, nemoclaw command reference, nemoclaw network policy, sandbox egress control operator approval, nemoclaw troubleshooting, nemoclaw debug sandbox issues.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-reference\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7DAS5S79VK33XFGVAM2TFWF","nemoclaw-user-overview","Explains how OpenClaw, OpenShell, and NemoClaw form the ecosystem, NemoClaw's position in the stack, what NemoClaw adds beyond the community sandbox, and when to prefer NemoClaw versus integrating OpenShell and OpenClaw directly. Use when users ask about the relationship between OpenClaw, OpenShell, and NemoClaw, or when to use NemoClaw versus OpenShell. Trigger keywords - nemoclaw ecosystem, openclaw openshell, nemoclaw vs openshell, sandboxed openclaw, how nemoclaw works, nemoclaw sandbox lifecycle blueprint, nemoclaw overview, openclaw always-on assistants, nvidia openshell, nvidia nemotron, nemoclaw release notes, nemoclaw changelog.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-overview\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7DAS0PQEMET5MNGZ1ABSZVS","nemoclaw-user-monitor-sandbox","Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-monitor-sandbox\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7DARQYGF7E9A69VH6S3CGN9","nemoclaw-user-manage-sandboxes","Explains operational tasks after the quickstart: listing sandboxes, status and health checks, logs, diagnostics, port forwards, multiple sandboxes, credential reset, rebuilds, network presets, upgrades, and uninstall. Trigger keywords - manage nemoclaw sandboxes, nemoclaw status, nemoclaw list, nemoclaw dashboard port, nemoclaw rebuild, nemoclaw upgrade sandboxes, nemoclaw uninstall, sandbox mutability, sandbox runtime configuration, sandbox rebuild, nemoclaw backup, nemoclaw restore, workspace backup, openshell sandbox download upload, nemoclaw messaging channels, nemoclaw telegram, nemoclaw discord, nemoclaw slack, nemoclaw wechat, nemoclaw whatsapp, openshell channel messaging, nemoclaw workspace files, soul.md, user.md, identity.md, agents.md, sandbox persistence.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-sandboxes\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7DARH8BRTG51TRCAB7YWDJ4","nemoclaw-user-manage-policy","Adds, removes, or modifies allowed endpoints in the sandbox policy. Use when customizing network policy, changing egress rules, or configuring sandbox endpoint access. Trigger keywords - customize nemoclaw network policy, sandbox egress policy configuration, nemoclaw integration policy examples, post-install policy setup, openshell approval workflow, policy preset, nemoclaw approve network requests, sandbox egress approval tui.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-policy\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M7DARAT62M2VR37590VCZ5NS","nemoclaw-user-get-started","Installs NemoClaw, launches a sandbox, and runs the first agent prompt. Use when onboarding, installing, or launching a NemoClaw sandbox for the first time. Trigger keywords - nemoclaw quickstart, install nemoclaw openclaw sandbox, nemohermes quickstart, hermes agent nemoclaw, run hermes openshell sandbox, nemoclaw prerequisites, nemoclaw supported platforms, nemoclaw hardware software, nemoclaw windows wsl2 setup, nemoclaw install windows docker desktop.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-get-started\u002FSKILL.md",[],[]]