explaingit

albert-weasker/niubi_guard

Analysis updated 2026-05-18

199TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

An open-source tool that scans GitHub issues and comments for spam, harassment, and coordinated abuse, then lets maintainers act on it with keyword rules or AI detection.

Mindmap

mindmap
  root((Niubi Guard))
    What it does
      Detects spam and abuse
      Flags coordinated attacks
      Dry-run by default
    Detection methods
      Keyword rules
      Blocklists and allowlists
      AI model detection
    Ways to run
      CLI from npm
      Web dashboard
      Docker image
    Use cases
      Protect maintainers
      Control destructive actions
      Multilingual support

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Scan a repository's issues and comments for spam or coordinated harassment patterns

USE CASE 2

Run destructive actions like deleting comments or blocking users only after explicitly enabling them

USE CASE 3

Configure an AI model to flag semantic attacks that keyword rules alone would miss

What is it built with?

TypeScriptNext.jsDockernpm

How does it compare?

albert-weasker/niubi_guardgordensun/learningcellpredictiveflow-labs/polymarket-arbitrage-bot
Stars199200197
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyhard
Complexity3/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs a GitHub token to scan a repo, and optionally an OpenAI-compatible API key for AI detection.

Apache-2.0 license: use freely for any purpose, including commercial use, as long as you keep the copyright and license notices.

In plain English

Niubi Guard is a free, open-source tool that helps GitHub project maintainers defend their repositories against spam, harassment, and coordinated abuse campaigns. It was built in response to a pattern maintainers have reported: waves of hostile issues, repeated copy-paste accusations, and reputation-pressure attacks that normal moderation tools are not designed to handle. The tool works by scanning your repository's issues and comments and flagging content that matches abuse patterns. Detection can rely on keyword rules you define, a blocklist of specific usernames, allowlists that protect trusted contributors, or an AI model of your choosing. For AI detection, Niubi Guard connects to any OpenAI-compatible API, meaning you supply the API key, model name, and custom prompt. The model returns a structured verdict (malicious or not, a confidence score, and a reason), and you set the confidence threshold at which the tool acts. All destructive responses, such as deleting comments, closing issues, locking threads, or blocking users, are turned off by default. You must explicitly enable each action in a configuration file and then pass an apply flag when running the tool. Without that flag, it only prints what it would do, making dry-run the safe default for new users. Niubi Guard ships with three ways to run it: a command-line tool installable from npm, a web-based dashboard built with Next.js that lets you configure everything through a browser without touching files, and a Docker image for self-hosted setups. A free hosted version is also available at niubistar.com/guard for maintainers who do not want to self-host. The interface supports English and Simplified Chinese. The project is licensed under Apache-2.0 and welcomes contributions, including new attack samples, false-positive examples, prompt improvements, and eventual GitHub App or GitHub Actions support. The roadmap shows plans for a review queue, community threat feeds, and a full GitHub App integration in a later version.

Copy-paste prompts

Prompt 1
Help me install Niubi Guard's CLI and run my first dry-run scan on a repository
Prompt 2
Walk me through writing a guard.config.json with keyword rules and an allowlist for trusted contributors
Prompt 3
Help me connect an OpenAI-compatible model to Niubi Guard's AI detection with a confidence threshold
Prompt 4
Show me how to run Niubi Guard's web dashboard locally with Docker

Frequently asked questions

What is niubi_guard?

An open-source tool that scans GitHub issues and comments for spam, harassment, and coordinated abuse, then lets maintainers act on it with keyword rules or AI detection.

What language is niubi_guard written in?

Mainly TypeScript. The stack also includes TypeScript, Next.js, Docker.

What license does niubi_guard use?

Apache-2.0 license: use freely for any purpose, including commercial use, as long as you keep the copyright and license notices.

How hard is niubi_guard to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is niubi_guard for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.