Recommended way to fork a library I want to extend a library, available on github to add some features I need.
Of course I will made available the new source code as well.
Because it's the first time I do this, I'm not sure how to do.

My idea:


fork the original repository
create a new branch
make the changes
commit them locally
push the new branch on another (mine) repository (of course, to avoid messing up the original one)


Is it correct?
How to test the library while developing it? I mean, in which folder I have to clone the repo?
Almost.


Fork the library to your account
Check out your fork
Edit as needed
Commit locally
Push back to your fork


Your fork is yours to do with as you wish. Github makes it easy, should you wish, to then pass those changes back up to the original repository (make a "pull request"). But you don't have to do that (and probably don't want to).

You can make a new branch if you like, but that's pointless - your fork is, in effect, a branch itself (well, it's an entire new tree really).